3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function add(float $a, float $b) { return $a + $b; } $returnValue = add("1 foo", "2"); echo $returnValue;
Output for 7.0.0 - 7.2.0
Notice: A non well formed numeric value encountered in /in/SRPZe on line 3 3
Output for 5.3.20 - 5.6.28
Catchable fatal error: Argument 1 passed to add() must be an instance of float, string given, called in /in/SRPZe on line 7 and defined in /in/SRPZe on line 3
Process exited with code 255.