From: narf at bofh dot bg Operating system: Irrelevant PHP version: Irrelevant Package: Unknown/Other Function Bug Type: Feature/Change Request Bug description:A function alternative to "php -l"
Description:
------------
Currently, there's no way to do a syntax check from within a script (unless
we do something like `/usr/bin/php -l /path/to/script.php`) and there
deffinately are use cases for such a feature.
Considering that the actual checking logic is already available, it
shouldn't be hard at all to make a function alternative to it.
Here's what the function description would look like:
bool php_syntax_check( string $target [, bool $raw_code = FALSE] )
$target is the script file path, unless $raw_code is set to TRUE. In the
latter case - $target is raw php code, as it would be passed to eval().
--
Edit bug report at https://bugs.php.net/bug.php?id=62544&edit=1
--
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=62544&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=62544&r=trysnapshot53
Try a snapshot (trunk):
https://bugs.php.net/fix.php?id=62544&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=62544&r=fixed
Fixed in SVN and need be documented:
https://bugs.php.net/fix.php?id=62544&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=62544&r=alreadyfixed
Need backtrace:
https://bugs.php.net/fix.php?id=62544&r=needtrace
Need Reproduce Script:
https://bugs.php.net/fix.php?id=62544&r=needscript
Try newer version:
https://bugs.php.net/fix.php?id=62544&r=oldversion
Not developer issue:
https://bugs.php.net/fix.php?id=62544&r=support
Expected behavior:
https://bugs.php.net/fix.php?id=62544&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=62544&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=62544&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=62544&r=globals
PHP 4 support discontinued:
https://bugs.php.net/fix.php?id=62544&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=62544&r=dst
IIS Stability:
https://bugs.php.net/fix.php?id=62544&r=isapi
Install GNU Sed:
https://bugs.php.net/fix.php?id=62544&r=gnused
Floating point limitations:
https://bugs.php.net/fix.php?id=62544&r=float
No Zend Extensions:
https://bugs.php.net/fix.php?id=62544&r=nozend
MySQL Configuration Error:
https://bugs.php.net/fix.php?id=62544&r=mysqlcfg
