3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump('1.5'+' 2'); var_dump('1.5'+' a'); // Warning on PHP >= 7.1 var_dump('1.5'+(float)' 2a'); var_dump('1.5'+' 2a'); // Notice on PHP >= 7.1 var_dump('1.5'+(float)' 2a');
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.31, 8.2.0 - 8.2.26, 8.3.0 - 8.3.14, 8.4.1
float(3.5) Fatal error: Uncaught TypeError: Unsupported operand types: string + string in /in/9h376:3 Stack trace: #0 {main} thrown in /in/9h376 on line 3
Process exited with code 255.
Output for 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.33
float(3.5) Warning: A non-numeric value encountered in /in/9h376 on line 3 float(1.5) float(3.5) Notice: A non well formed numeric value encountered in /in/9h376 on line 5 float(3.5) float(3.5)
Output for 7.3.32 - 7.3.33
float(3.5) Warning: A non-numeric value encountered in /in/9h376 on line 3 float(1.5) float(3.5) float(3.5) float(3.5)
Output for 5.6.0 - 5.6.40, 7.0.0 - 7.0.33
float(3.5) float(1.5) float(3.5) float(3.5) float(3.5)

preferences:
88.43 ms | 414 KiB | 6 Q