#19151 [NEW]: Checking for a valid PHP file from PHP
| From: | markhers at green-ant dot com | Date: | Wed, 28 Aug 2002 14:55:19 +0000 |
| Subject: | #19151 [NEW]: Checking for a valid PHP file from PHP | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-18036@lists.php.net to get a copy of this message | ||
From: markhers@green-ant.com
Operating system: Any
PHP version: 4.2.2
PHP Bug Type: Feature/Change Request
Bug description: Checking for a valid PHP file from PHP
In the CLI version, you can do:
'php -l {filename}'
and find out whether the file you specified is syntactically correct.
This would be a powerful feature to be able to call from userland when
deciding whether or not to include files based on whether or not they are
valid PHP files.
I know this is in the Zend area of things, but it would be a very cool
addition.
In /sapi/cli/php_cli.c, it seems like a trivial function. Before creating
a function to submit, or someone beating me to it, is there a good reason
NOT to do this?
--
Edit bug report at http://bugs.php.net/?id=19151&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=19151&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=19151&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=19151&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=19151&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=19151&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=19151&r=support
Expected behavior: http://bugs.php.net/fix.php?id=19151&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=19151&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=19151&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=19151&r=globals