|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64596 Parsekit should ignore scope of host file
Submitted: 2013-04-06 03:53 UTC Modified: 2017-04-01 21:16 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: krinklemail at gmail dot com Assigned:
Status: Wont fix Package: parsekit (PECL)
PHP Version: 5.4.13 OS: Mac OS
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: krinklemail at gmail dot com
New email:
PHP Version: OS:


 [2013-04-06 03:53 UTC] krinklemail at gmail dot com
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:
$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-


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-04-01 21:16 UTC]
-Status: Open +Status: Wont fix
 [2017-04-01 21:16 UTC]
Due to this extension not seeing any activity since 2009, this issue will not be fixed. We are therefore closing this now.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed May 18 03:05:46 2022 UTC