|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-10-31 16:46 UTC] pollita@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 11:00:01 2025 UTC |
Description: ------------ (Version is actually 5.0.5 but it doesn't give me that option...) Using latest runkit. runkit_method_add changes the case of its class argument to all lowercase, even though it is not documented as being passed by reference. Somewhat bizarely, if you assign the same string to a different variable (normal assignment, not assignment by reference), it changes both strings!!!!! Reproduce code: --------------- <? class TestClass { } $TARGET1 = "TestClass"; $TARGET2 = $TARGET1; echo "TARGET1=$TARGET1,TARGET2=$TARGET2\n"; runkit_method_add($TARGET1,"foo",'$a','echo "Hello:$a\n";'); echo "TARGET1=$TARGET1,TARGET2=$TARGET2\n"; Expected result: ---------------- TARGET1=TestClass,TARGET2=TestClass TARGET1=TestClass,TARGET2=TestClass Actual result: -------------- TARGET1=TestClass,TARGET2=TestClass TARGET1=testclass,TARGET2=testclass