3v4l.org

run code in 300+ PHP versions simultaneously
<?php function add(float $a, float $b) { return $a + $b; } echo add(1, 2); ?>
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
3
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.28
Catchable fatal error: Argument 1 passed to add() must be an instance of float, integer given, called in /in/fEO1Y on line 6 and defined in /in/fEO1Y on line 2
Process exited with code 255.

preferences:
196.15 ms | 402 KiB | 225 Q