|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2016-11-18 21:41 UTC] kalle@php.net
 
-Status: Open
+Status: Wont fix
  [2016-11-18 21:41 UTC] kalle@php.net
 | |||||||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 02:00:02 2025 UTC | 
Description: ------------ When compiling cached opcode, APC does not check if functions are already declared. This seems to be happening because the return value of install_function() in cached_compile() is not checked. If you need more testing or patches, please let me know. I'd be glad to help. Reproduce code: --------------- Step one: ~# cat index.php <?php require('file2.php'); test(); ~# cat file2.php <?php function test() { echo 'test() called from file2.php'; } Load index.php in a browser. Step two: ~# cat index.php <?php require('file1.php'); require('file2.php'); test(); ~# cat file1.php <?php function test() { echo 'test() called from file1.php'; } ~# cat file2.php <?php function test() { echo 'test() called from file2.php'; } Reload index.php in a browser. Expected result: ---------------- Fatal error: Cannot redeclare test() (previously declared in ~/file1.php:2) in ~/file2.php on line 2 Actual result: -------------- test() called from file1.php