|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-08-25 07:21 UTC] sjoerd@php.net
[2009-08-25 09:04 UTC] an0nym at narod dot ru
[2010-12-20 13:19 UTC] jani@php.net
-Package: Feature/Change Request
+Package: Scripting Engine problem
[2013-02-17 10:29 UTC] stas@php.net
[2013-02-17 10:29 UTC] stas@php.net
-Status: Open
+Status: Not a bug
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 23 07:00:01 2025 UTC |
Description: ------------ When argument of function or method is defined with type declaration and default value and is called with some value of this argument, debug_backtrace() doesn't reference this argument of function in stack. When function definition is the same except argument doesn't have default value, everything goes normal. Reproduce code: --------------- <?php function error($message,$number){ $traces=debug_backtrace(); $traces[1]['args'][0]='1'; return TRUE; } set_error_handler('error'); function a(anyUndefinedType $a){ // E_RECOVERABLE_ERROR var_dump($a===1,$a==='1'); } function b(anyUndefinedType $b=NULL){ // E_RECOVERABLE_ERROR var_dump($b===1,$b==='1'); } a(1); b(1); ?> Expected result: ---------------- bool(false) bool(true) bool(false) bool(true) Actual result: -------------- bool(false) bool(true) bool(true) bool(false)