3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php declare(strict_types=0); function foo(int $i) { echo $i; } foo("10 ducks in a row");
based on 45aZc
Output for 7.0.0 - 7.3.0rc3
Notice: A non well formed numeric value encountered in /in/YPdEM on line 4 10
Output for hhvm-3.15.4
Notice: A non well formed numeric value encountered in /in/YPdEM on line 6 10
Output for 5.6.0 - 5.6.30
Warning: Unsupported declare 'strict_types' in /in/YPdEM on line 2 Catchable fatal error: Argument 1 passed to foo() must be an instance of int, string given, called in /in/YPdEM on line 8 and defined in /in/YPdEM on line 4
Process exited with code 255.