note 77663 added to function.call-user-func

From: Date: Fri, 07 Sep 2007 12:31:01 +0000
Subject: note 77663 added to function.call-user-func
Groups: php.notes 
Request: Send a blank email to php-notes+get-130290@lists.php.net to get a copy of this message
You don't need to use this function to call a variable class function. Instead you can do the following: $this->{$fnname}(); The example works in PHP 5 from within the class. It is the {} that do the trick. Regards, Julian. ---- Server IP: 80.64.47.13 Probable Submitter: 194.176.105.47 ---- Manual Page -- http://www.php.net/manual/en/function.call-user-func.php Edit -- https://master.php.net/note/edit/77663 Del: integrated -- https://master.php.net/note/delete/77663/integrated Del: useless -- https://master.php.net/note/delete/77663/useless Del: bad code -- https://master.php.net/note/delete/77663/bad+code Del: spam -- https://master.php.net/note/delete/77663/spam Del: non-english -- https://master.php.net/note/delete/77663/non-english Del: in docs -- https://master.php.net/note/delete/77663/in+docs Del: other reasons-- https://master.php.net/note/delete/77663 Reject -- https://master.php.net/note/reject/77663 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#130290) next »