|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-02-09 09:57 UTC] moriyoshi@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 23 11:00:01 2025 UTC |
<?php class Foo { const Bar = 'Foobar'; function foobar($foobar = Foo::Bar) { echo $foobar; } } $o = new Foo; $o->foobar(); ?> works, but <?php class Foo { const Bar = 'Foobar'; function foobar($foobar = self::Bar) { echo $foobar; } } $o = new Foo; $o->foobar(); ?> does not and prints "Fatal error: Undefined class 'self' in c:\test.php on line 5".