note 114819 added to language.types.callable

From: Date: Wed, 09 Apr 2014 12:45:30 +0000
Subject: note 114819 added to language.types.callable
Groups: php.notes 
Request: Send a blank email to php-notes+get-199234@lists.php.net to get a copy of this message
i did the same thing mentioned above but the following code not working. Why? --------------------------------------------------------- class Alfa1 { public static function falfa() { echo "In Alfa"; } } class Beta1 extends Alfa1 { public static function falfa() { echo "In Beta"; } } call_user_func(array('Beta1','parent::flafa')); Tested in two latest version of PHP both gives: Warning: call_user_func() expects parameter 1 to be a valid callback, class 'Alfa1' does not have a method 'flafa' in Xampp\htdocs\a.php on line 15 ---- Server IP: 72.52.91.14 Probable Submitter: 122.161.234.222 ---- Manual Page -- http://php.net/manual/en/language.types.callable.php Edit -- https://master.php.net/note/edit/114819 Del: integrated -- https://master.php.net/note/delete/114819/integrated Del: useless -- https://master.php.net/note/delete/114819/useless Del: bad code -- https://master.php.net/note/delete/114819/bad+code Del: spam -- https://master.php.net/note/delete/114819/spam Del: non-english -- https://master.php.net/note/delete/114819/non-english Del: in docs -- https://master.php.net/note/delete/114819/in+docs Del: other reasons-- https://master.php.net/note/delete/114819 Reject -- https://master.php.net/note/reject/114819 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#199234) next »