|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-01-15 13:08 UTC] danack@php.net
-Assigned To:
+Assigned To: danack
[2016-01-15 13:08 UTC] danack@php.net
[2021-10-20 13:14 UTC] cmb@php.net
-Status: Assigned
+Status: Wont fix
-Package: Unknown/Other Function
+Package: Scripting Engine problem
-Assigned To: danack
+Assigned To: cmb
[2021-10-20 13:14 UTC] cmb@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 22:00:01 2025 UTC |
Description: ------------ PHP 5.4.7 When "self" is provided to is_callable, while inside a class that doesn't contain the method nor has a parent with the method, it will behave as $this. Subsequent calling of the method which had been falsely declared callable, will result in Fatal error: Call to undefined method A::y() in *__FILE__* on line 5 Test script: --------------- <?php class A { public function x() { if (is_callable(array($this, "y"))) $this::y(); if (is_callable(array("self", "y"))) self::y(); } } class B extends A { public function y() {} } (new B())->x(); ?> Expected result: ---------------- Self should behalve like __CLASS__ in the example above and the fatal error should be avoided.