This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// http://php.net/manual/en/language.oop5.typehinting.php says that type-hinted PHP parameter | |
// that has no default value set to null can't be null. But are you sure? | |
// First, register error handler which do nothing and return nothing (this is important!) | |
set_error_handler(function () {}); | |
class SomeClass {} | |
function test(SomeClass $instance) {var_dump($instance);} |