note 106391 added to function.call-user-func

From: Date: Fri, 04 Nov 2011 13:00:02 +0000
Subject: note 106391 added to function.call-user-func
Groups: php.notes 
Request: Send a blank email to php-notes+get-184287@lists.php.net to get a copy of this message
In PHP v5.2, you /can/ use call_user_func(array($this, 'parent::SOME_FUNCTION')). If you don't have custom __autoload() function, you are good to go. If you do have custom __autoload(), you need to make it `parent' aware. Something like: <?php function __autoload($classname) { if ($classname === 'parent') return; else ((load class definition)) } ?> Rationale: PHP 5.2 surprisingly tries to autoload a class named parent'. However, if you don't do anything in __autoload() for the parent' class, it'll work just fine. ---- Server IP: 195.114.0.19 Probable Submitter: 89.228.8.130 ---- Manual Page -- http://www.php.net/manual/en/function.call-user-func.php Edit -- https://master.php.net/note/edit/106391 Del: integrated -- https://master.php.net/note/delete/106391/integrated Del: useless -- https://master.php.net/note/delete/106391/useless Del: bad code -- https://master.php.net/note/delete/106391/bad+code Del: spam -- https://master.php.net/note/delete/106391/spam Del: non-english -- https://master.php.net/note/delete/106391/non-english Del: in docs -- https://master.php.net/note/delete/106391/in+docs Del: other reasons-- https://master.php.net/note/delete/106391 Reject -- https://master.php.net/note/reject/106391 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#184287) next »