|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2015-11-22 19:34 UTC] lisachenko dot it at gmail dot com
Description: ------------ Can not export reflection method in the abstract class to the string value for method with default parameter, equals to 'self::class' See https://3v4l.org/3TdIg, reproduced in all latest 5.6 versions. Test script: --------------- <?php abstract class Foo { private function bar($a = self::class) {} } $refMethod = new \ReflectionMethod('Foo', 'bar'); echo "Exported: ", $refMethod; Expected result: ---------------- Exported: Method [ <user> private method bar ] { @@ /in/3TdIg 5 - 5 - Parameters [1] { Parameter #0 [ <optional> $a = 'Foo' ] } } Actual result: -------------- Exported: Process exited with code 139. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 11:00:01 2025 UTC |
actually, this is not only about refelction, see also: <?php abstract class Foo { function bar($a = self::class) {} } trait T { public function bar() { } } class Bar extends Foo { use T; }