News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Matthew Weir O'Phinney's Blog:
PHP error reporting for Perl users
March 28, 2006 @ 06:52:40

When you're working with error reporting, every little bit helps. If you're a Perl user coming into a PHP world, then this new post from Matthew Weir O'Phinney might provide a valuable tip.

On perlmonks today, a user was needing to maintain a PHP app, and wanted to know what the PHP equivalent of "perl -wc script.pl" was -- specifically, they wanted to know how to run a PHP script from the commandline and have it display any warnings (ala perl's strict and warnings pragmas).

Unfortunately, there's not as simple a way to do this in PHP as in perl.

He suggets two ways to do it - one involving the display_errors setting and a change to the error_reporting level, and the other an automatically prepended file that does the same (just simpler to use). He also mentions a side note, a question the user had about running a PHP script on the command line.

0 comments voice your opinion now!
perl error reporting display_errors error_reporting perl error reporting display_errors error_reporting


blog comments powered by Disqus

Similar Posts

Stefan Mischook's Blog: Does Wordpress 2.5.1 suck?

Lorna Mitchell's Blog: SugarCRM Installation Error

Pierre-Alain Joye's Blog: Howto use a single php.ini for cli/cgi with htscanner, use 0.7.0 or later

SitePoint PHP Blog: How strict is your dynamic language?

Web Development Blog: 404 Errors: Report, monetize and analyse


Community Events





Don't see your event here?
Let us know!


opinion list series unittest configure install interview experience laravel introduction framework threedevsandamaybe release testing code language developer community symfony2 podcast

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework