|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-04-01 21:16 UTC] tpunt@php.net
-Status: Open
+Status: Wont fix
[2017-04-01 21:16 UTC] tpunt@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 05:00:01 2025 UTC |
Description: ------------ When using parsekit_compile_file from a file that contains an equally named function as the file it is parsing, it will include an error: "Cannot redeclare example() (previously declared in lint.php:2)" Parsekit should ignore the scope of the host file. Test script: --------------- <?php $errors = array(); $oparray = parsekit_compile_file($_SERVER['PHP_SELF'], $errors, PARSEKIT_SIMPLE); var_dump($oparray, $errors); function example() {} Expected result: ---------------- It should encounter 0 errors. Actual result: -------------- It encounters an error for every function in the compiled file that has the same name as the file parsekit_compile_file is called from. It doesn't have to be the same file (though that's the easiest way to test it). Cannot redeclare example() (previously declared in /tmp/pecl-php- parsekit/examples/compile_file.php:8)