|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-08-10 02:21 UTC] ben-bugs dot php dot net at efros dot com
[2002-08-10 07:23 UTC] wez@php.net
[2002-08-10 11:58 UTC] ben-bugs dot php dot net at efros dot com
[2002-08-10 13:17 UTC] wez@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 06 17:00:01 2026 UTC |
class tmp { var $tmp = ''; function __construct($t) { $this->tmp=$t; } } $x = new tmp(4); $y = $x; echo "x = ".$x->tmp."<BR>\n"; /* prints 4 */ echo "y = ".(++$y->tmp)."<BR>\n"; /* prints 5 */ echo "x = ".$x->tmp."<BR>\n"; /* prints 5, but should be 4 still */ I guess the $y is still referencing the $x class ... Also, if I create __clone(), it doesn't appear to execute. This was tested on CVS 2002-8-8 SAPI and also 4.3.0 alpha 2 CLI