|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-03-11 20:09 UTC] aharvey@php.net
-Type: Bug
+Type: Feature/Change Request
-Package: Unknown/Other Function
+Package: Scripting Engine problem
[2015-03-11 20:09 UTC] aharvey@php.net
[2015-03-11 20:17 UTC] php at w3x4 dot com
[2015-03-11 20:20 UTC] aharvey@php.net
[2017-08-05 04:52 UTC] stas@php.net
-Status: Open
+Status: Suspended
[2017-08-05 04:52 UTC] stas@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 13 07:00:01 2025 UTC |
Description: ------------ /* Using Visual Studio 2013 with Devsense PHP Tools, or * Using UEStudio 15: * * 1) Set breakpoint on the 3 lines containing: $c=2 * * 2) Examine Locals window to confirm that $a does not appear when a static call or a function call passes more variables than the called method/function expects. * * 3) Examine the error log to confirm that php does not throw an error or report a warning. * * 4) Note that the existence of a reference to $a in Class Two results in $a being displayed in the Locals window. Note also that removing '$b=1' will result in $a being displayed in Locals window. * * I suggest that PHP should throw a fatal error when passing more parameters than the function/method expects; it seems some other (related) php problem is the cause of $a not being displayed in Locals window. * * * <SAA> */ Test script: --------------- $xyz = new Class1; class Class1 { public function __construct() { $this->_callHook(); } function _callHook(){ $ret = One::f1('a'); $ret = f1('b'); $ret = Two::f1('a'); } } class One{ static function f1(){ $a=1; $b=1; $c=2; } } function f1(){ $a=1; $b=1; $c=2; } class Two{ static function f1(){ $a=1; $b=1; $c=2; echo $a; } }