note 73105 added to function.call-user-func-array
| From: | levi at alliancesoftware dot com dot au | Date: | Thu, 08 Feb 2007 22:50:29 +0000 |
| Subject: | note 73105 added to function.call-user-func-array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-123159@lists.php.net to get a copy of this message | ||
Regarding the comments below about calling parent constructors:
PHP5 with E_STRICT no longer allows calls as below:
<?
// Causes an error with E_STRICT
call_user_func_array(array('parent', '__construct'), $args);
?>
It gives an error because you are trying to call a nonstatic function as if it was static. The
correct syntax is
<?
// Works fine
call_user_func_array(array($this, 'parent::__construct'), $args);
?>
----
Server IP: 203.16.234.90
Probable Submitter: 210.84.13.134
----
Manual Page -- http://www.php.net/manual/en/function.call-user-func-array.php
Edit -- https://master.php.net/note/edit/73105
Del: integrated -- https://master.php.net/note/delete/73105/integrated
Del: useless -- https://master.php.net/note/delete/73105/useless
Del: bad code -- https://master.php.net/note/delete/73105/bad+code
Del: spam -- https://master.php.net/note/delete/73105/spam
Del: non-english -- https://master.php.net/note/delete/73105/non-english
Del: in docs -- https://master.php.net/note/delete/73105/in+docs
Del: other reasons-- https://master.php.net/note/delete/73105
Reject -- https://master.php.net/note/reject/73105
Search -- https://master.php.net/manage/user-notes.php