note 104632 added to function.is-callable

From: Date: Mon, 27 Jun 2011 10:50:10 +0000
Subject: note 104632 added to function.is-callable
Groups: php.notes 
Request: Send a blank email to php-notes+get-180981@lists.php.net to get a copy of this message
Note that is_callable is aware of context, and you can ask it things like parent::__construct from within a child constructor <?php class TestClass extends TestClassParent { /** @brief Object initialisation callback @returns void */ public function __construct() { # do initialisation # ... # if we have a parent if(is_callable('parent::__construct')) { # then bubble up parent::__construct(); } } } ?> ---- Server IP: 87.124.126.127 Probable Submitter: 82.32.254.149 (proxied: 82.32.254.149) ---- Manual Page -- http://www.php.net/manual/en/function.is-callable.php Edit -- https://master.php.net/note/edit/104632 Del: integrated -- https://master.php.net/note/delete/104632/integrated Del: useless -- https://master.php.net/note/delete/104632/useless Del: bad code -- https://master.php.net/note/delete/104632/bad+code Del: spam -- https://master.php.net/note/delete/104632/spam Del: non-english -- https://master.php.net/note/delete/104632/non-english Del: in docs -- https://master.php.net/note/delete/104632/in+docs Del: other reasons-- https://master.php.net/note/delete/104632 Reject -- https://master.php.net/note/reject/104632 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#180981) next »