- error_reporting: documentation ( source)
<?php
error_reporting(E_ALL);
$f=function($var){
echo "the closure test $var\n";
};
class Bla {
public $foo;
public function __construct($f){
$this->foo = $f;
}
}
$bla = new Bla($f);
($bla->foo)("someval");