ID:               19151
 Updated by:       [EMAIL PROTECTED]
 Reported By:      markhers at green-ant dot com
-Status:           Open
+Status:           Closed
 Bug Type:         Feature/Change Request
 Operating System: Any
 PHP Version:      4.2.2
 New Comment:

Fixed in PHP5.
bool php_check_syntax ( string file_name [, string error_message])


Previous Comments:
------------------------------------------------------------------------

[2003-01-29 08:45:02] [EMAIL PROTECTED]

I see no reasons why not to have it, especially if something like it
was already implemented... Anyone?

------------------------------------------------------------------------

[2002-08-28 10:55:19] markhers at green-ant dot com

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 this bug report at http://bugs.php.net/?id=19151&edit=1

Reply via email to