3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function doSomething(string $value) { try { $value / 32 * 1 . " test"; } catch(Throwable $e) { var_dump($e); } return $value; } doSomething("Hello");
based on R4M2n
Output for 7.1.0 - 7.2.0
Warning: A non-numeric value encountered in /in/PqZbq on line 6
Output for 7.0.0 - 7.0.20
Output for 5.3.21 - 5.6.21
Catchable fatal error: Argument 1 passed to doSomething() must be an instance of string, string given, called in /in/PqZbq on line 13 and defined in /in/PqZbq on line 3
Process exited with code 255.