note 22564 deleted from function.call-user-func-array by cmb
| From: | cmb@php.net | Date: | Sun, 30 Aug 2015 18:12:25 +0000 |
| Subject: | note 22564 deleted from function.call-user-func-array by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-203517@lists.php.net to get a copy of this message | ||
Note Submitter: NOSPAM dot dont dot remove at thekid dot de
----
Unified constructors in PHP4:
<?php
class Object {
function Object() {
$args= func_get_args();
call_user_func_array(array(&$this, '__construct'), $args);
}
function __construct($args= NULL) {
var_dump($args);
}
}
class Exception extends Object {
var
$message;
function __construct($message) {
$this->message= $message;
parent::__construct();
}
}
class IOException extends Exception {
}
var_dump(
error_reporting(),
zend_version(),
phpversion()
);
$c= new IOException('file not found');
echo '===> Result: '; var_dump($c);
?>