[PHP] phpinfo() doesn't report correctly for php 5.0.3

2005-01-24 Thread Cere Davis
Has anyone else noticed this? When I install php5.0.3 with: make clean ./configure --prefix=/usr/local --with-mysqli=shared,/usr/bin/mysql_config --enable-soap --enable-cli --with-pear --with-apxs2=/usr/bin/apxs2 --enable-xmlrpc --no-create --no-recursion --with-soap --with-xmlrpc

[PHP] Re: calling php functions as library or cmd line

2005-01-14 Thread Cere Davis
Geeze, That was obnoxious. Luckily google helped me out eventually: if (basename($argv[0]) == basename(__FILE__)) { Robert Cummings wrote: On Thu, 2005-01-13 at 09:46, Cere Davis wrote: Does anyone know how to write php libraries in a modular way so that you can both test the libraries

[PHP] calling php functions as library or cmd line

2005-01-13 Thread Cere Davis
Does anyone know how to write php libraries in a modular way so that you can both test the libraries/functions on the command line with arguments and/or use the php library as a part of your web code with 'require_once()' syntax? Sort of like how Python or Ruby works? Thanks, Cere -- PHP

[PHP] stdClass to array

2005-01-11 Thread Cere Davis
Hey folks, Does anyone know of a painless way to convert a stdClass object to an associative array in php? Also, I wonder, is there a way to flatten associative arrays in php? So say: $b=new array(s=S) $a=new array(a=A,b=$b) goes to: $z=flatten($a); z turns to: (a=A, b=$b, s=S); Thanks,

[PHP] an easy (perhaps dumb) question about PHP

2004-06-07 Thread Cere Davis
I haven't been able to glean anything about this from the Oreilly books, php web site, or anywhere else so I am breaking down and asking on this list. In other scripting languages like Perl/Ruby/Python (that aren't meant to live in the web environment exclusively) there usually have a web