3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class luokka { public function intToString(int $i) : string { return $i+""; } } $jep = new luokka(); echo $jep->intToString("1");
based on ZhVNc
Output for 7.1.0 - 7.3.0rc4
Warning: A non-numeric value encountered in /in/LdJiP on line 10 1
Output for 7.0.0 - 7.0.20
1
Output for 5.3.20 - 5.6.28
Parse error: syntax error, unexpected ':', expecting ';' or '{' in /in/LdJiP on line 8
Process exited with code 255.