note 48835 added to function.php-check-syntax

From: Date: Sat, 08 Jan 2005 16:06:38 +0000
Subject: note 48835 added to function.php-check-syntax
Groups: php.notes 
Request: Send a blank email to php-notes+get-82955@lists.php.net to get a copy of this message
In PHP4, if (!function_exists('php_check_syntax')){ function php_check_syntax($filename, &$errormessage){ $command = 'php -l ' . $filename; $output = shell_exec($command); if (strpos($output, 'No syntax errors detected in') !== false){ $errormessage = ''; return(true); } else { $errormessage = $output; return(false); } } } // Note: this function will have the same security constraints as shell_exec for a given system ---- Manual Page -- http://www.php.net/manual/en/function.php-check-syntax.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+48835 Delete -- http://master.php.net/manage/user-notes.php?action=delete+48835&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+48835&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+48835&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+48835&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+48835&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+48835&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+48835&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#82955) next »