Re: [PHP] Variable Troubleshooting Code

2012-01-10 Thread Donovan Brooke
Jim Lucas wrote: [snip] if (!isset($pmatch) || substr($key,0,strlen($pmatch)) == $pmatch) { print "$key = $value"; } [snip] I would change the above the the following: if ( empty($pmatch) || ( strpos($key, $pmatch) === 0 ) ) { print "$key = $value"; } it would be slightly faster love th

Re: [PHP] Variable Troubleshooting Code

2012-01-10 Thread Jim Lucas
On 01/09/2012 07:16 PM, Donovan Brooke wrote: Just to share, a Mr. Harkness forwarded me a consolidated version of my code.. basically substituting the innards for: if (!isset($pmatch) || substr($key,0,strlen($pmatch)) == $pmatch) { print "$key = $value"; } Cheers, Donovan I would change

Re: [PHP] Variable Troubleshooting Code

2012-01-09 Thread Donovan Brooke
Just to share, a Mr. Harkness forwarded me a consolidated version of my code.. basically substituting the innards for: if (!isset($pmatch) || substr($key,0,strlen($pmatch)) == $pmatch) { print "$key = $value"; } Cheers, Donovan -- D Brooke -- PHP General Mailing List (http://www.php.ne

Re: [PHP] Variable Troubleshooting Code

2012-01-09 Thread Paul M Foster
On Mon, Jan 09, 2012 at 10:42:59AM -0500, Marc Guay wrote: > > some pretty natives php functions exists to do the job : > > But how many times in my life will I have write echo ""; ??? > Does anyone have a handy solution? (Make this the default behavior? > Add a "even more human-readable" flag to

Re: [PHP] Variable Troubleshooting Code

2012-01-09 Thread Ashley Sheridan
Ashley Sheridan wrote: > > >Marc Guay wrote: > >>> some pretty natives php functions exists to do the job : >> >>But how many times in my life will I have write echo ""; ??? >>Does anyone have a handy solution? (Make this the default behavior? >>Add a "even more human-readable" flag to the fun

Re: [PHP] Variable Troubleshooting Code

2012-01-09 Thread Ashley Sheridan
Marc Guay wrote: >> some pretty natives php functions exists to do the job : > >But how many times in my life will I have write echo ""; ??? >Does anyone have a handy solution? (Make this the default behavior? >Add a "even more human-readable" flag to the function? Create a >simple macro in Ap

Re: [PHP] Variable Troubleshooting Code

2012-01-09 Thread Marc Guay
> some pretty natives php functions exists to do the job : But how many times in my life will I have write echo ""; ??? Does anyone have a handy solution? (Make this the default behavior? Add a "even more human-readable" flag to the function? Create a simple macro in Aptana 3?) Argz, Marc -- P

Re: [PHP] Variable Troubleshooting Code

2012-01-07 Thread David Courtin
Hi, some pretty natives php functions exists to do the job : var_export — Outputs or returns a parsable string representation of a variable debug_zval_dump — Dumps a string representation of an internal zend value to output var_dump — Dumps information about a variable print_r — Prints human-read