|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-05-13 13:21 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Wed Mar 18 13:00:01 2026 UTC |
Description: ------------ just look @ the code Reproduce code: --------------- <?php class A { public $b; public function __construct() { $this->b = new B; } } class B { const text = "Hello World"; } $a = new A; var_dump($a); var_dump($a->b); var_dump($a->b::text); // Error var_dump(($a->b)::text); // Error $b = $a->b; var_dump($b::text); // Works ?>