News Feed
Sections




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

Matthew Turland's Blog:
CDC Update (or an Unusual Parse Error)
April 09, 2009 @ 09:32:46

Matthew Turland came across an interesting bug when working with the Cares Document Checker he's developing related to linting (running a syntax check) on a given PHP file.

While doing a lint check on a code block, a parse error was occurring on a line that contained a comment in the original source file. [...] Presumably what was happening was, even though the var_dump() call showed that actual newlines were being interpreted correctly, the r was also being interpreted rather than taken literally. This caused the comma following it to generate the error I was receiving.

An alternative to the method he was using, shell_exec, is proc_open, a function that opens a resource to handle a command execution and allows for more than just the "point and shoot" execution that things like shell_exec, or system.

0 comments voice your opinion now!
parse error vardump comment shellexec system exec procopen


blog comments powered by Disqus

Similar Posts

SomeCoders.com: Member Managment System Using PHP, AJAX and script.aculo.us (Part 1)

Derick Rethans' Blog: PHP's two-pass compiler

Antony Dovgal's Blog: PhD docu builds are online!

DevShed: Building Your Own System Tray Application Using PHP-GTK

NewsForge: New kid on the blog: A look at Serendipity 1.0


Community Events

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


language release laravel5 example laravel api library voicesoftheelephpant install introduction community framework unittest extension php7 interview xdebug podcast opinion series

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