|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-07-15 14:24 UTC] reeze dot xia at gmail dot com
[2012-07-15 15:01 UTC] narf at bofh dot bg
[2012-07-15 16:29 UTC] reeze dot xia at gmail dot com
[2021-06-03 08:56 UTC] krakjoe@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: krakjoe
[2021-06-03 08:56 UTC] krakjoe@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 20 20:00:01 2025 UTC |
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().