|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-06-20 20:29 UTC] dmitry@php.net
[2005-06-21 18:21 UTC] sniper@php.net
[2006-03-15 09:28 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 18:00:02 2025 UTC |
Description: ------------ See reproduce code. php.ini is stock / no changes. Reproduce code: --------------- <?php // a class that does nothing class something{ function nothing(){ } } // a pass-by-value function that modifies a member's member function pass_by_value($value){ $value->member->val = 1; } // create a something with a member something $object = new something; $object->member = new something; // call nothing, then call pass_by_value and print results $object->member->nothing(); echo "member->val should be empty!\n"; pass_by_value($object); print_r($object); ?> Expected result: ---------------- $object->member should be empty Actual result: -------------- $object->member->val == 1