3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php declare(strict_types=0); function aloha(int $x) { return $x+1; } $a = aloha("12 "); var_dump($a);
based on YA17m
Output for 7.0.0 - 7.3.0rc3
Notice: A non well formed numeric value encountered in /in/PgnF7 on line 5 int(13)
Output for hhvm-3.12.14 - 3.17.3
Notice: A non well formed numeric value encountered in /in/PgnF7 on line 8 int(13)
Output for 5.6.0 - 5.6.30
Warning: Unsupported declare 'strict_types' in /in/PgnF7 on line 3 Catchable fatal error: Argument 1 passed to aloha() must be an instance of int, string given, called in /in/PgnF7 on line 10 and defined in /in/PgnF7 on line 5
Process exited with code 255.