3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class luokkaat { public $etunimi = ''; } function testi (luokka $testi) { return true; } testi(new luokkaat());
based on 9cNsg
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught TypeError: Argument 1 passed to testi() must be an instance of luokka, instance of luokkaat given, called in /in/LXXOo on line 12 and defined in /in/LXXOo:8 Stack trace: #0 /in/LXXOo(12): testi(Object(luokkaat)) #1 {main} thrown in /in/LXXOo on line 8
Process exited with code 255.
Output for 5.3.19 - 5.6.21
Catchable fatal error: Argument 1 passed to testi() must be an instance of luokka, instance of luokkaat given, called in /in/LXXOo on line 12 and defined in /in/LXXOo on line 8
Process exited with code 255.