|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-12-16 11:49 UTC] cataphract@php.net
-Status: Open
+Status: Duplicate
[2010-12-16 11:49 UTC] cataphract@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 11:00:01 2025 UTC |
Description: ------------ why section 1 is error and section 2 is correct? Test script: --------------- section 1: class p { public function a() { echo '123<hr>'; $p = 'this'; return $$p; } } $c = new p(); $c->a(); section 2: class p { public function a() { echo '123<hr>'; $this; $p = 'this'; return $$p; } } $c = new p(); $c->a(); Expected result: ---------------- i deem section 1 should be no error,while it give me a notice.