- Output for 5.3.0 - 5.3.27, 5.4.0 - 5.4.19
- Fatal error: Default value for parameters with a class type hint can only be NULL in /in/f7lUg on line 4
Process exited with code 255.
<?php
/* Accepting NULL value */
function test(stdClass $obj = 1) {
var_dump($obj);
}
test(new stdClass);
?>