|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-01-12 01:16 UTC] helly@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 22 15:00:01 2025 UTC |
Description: ------------ The attached code behaves differently when Zend-compiled versus not. (It breaks when Zend-compiled). It looks like maybe the for-loop is getting optimized away, incorrectly. The Zend Optimizer running on the server is: Zend Optimizer v2.5.5. I'll post the version of the Zend compiler when I get a chance to look it up. I lied about the PHP version (4.3.9) because upgrading to test is not practical, but it seems to depend on the encoder version, not the PHP version. Reproduce code: --------------- function include_next() { # Infer the calling file from the backtrace $bt = debug_backtrace(); for ($i=0; $bt[$i] && !$bt[$i]['file']; $i++); $caller = $bt[$i]['file']; assert($caller); // ... do some stuff with $caller } Expected result: ---------------- I expect the assertion to NOT fail. Actual result: -------------- Assertion fails.