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

Reply via email to