3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php declare(strict_types=1); function osszeadas(int $a, int $b): int { return $a+$b; } for(int $i=0;$i<=10000;$i++) { osszeadas($i, $i*2); }
based on PbBsR
Output for 7.0.0 - 7.0.1
Parse error: syntax error, unexpected '$i' (T_VARIABLE), expecting ';' in /in/2OSP3 on line 7
Process exited with code 255.
Output for 5.3.20 - 5.6.16
Warning: Unsupported declare 'strict_types' in /in/2OSP3 on line 2 Parse error: syntax error, unexpected ':', expecting '{' in /in/2OSP3 on line 3
Process exited with code 255.