3v4l.org

run code in 300+ PHP versions simultaneously
<?php function stuff(int $i, string $s, float $f, Point $p, int $m = 0) {} try { str_replace(1); } catch(ArgumentCountError $e) { echo $e->getMessage(), PHP_EOL; } try { stuff(1); } catch(ArgumentCountError $e) { echo $e->getMessage(), PHP_EOL; }
Output for 8.2.0 - 8.2.29, 8.3.0 - 8.3.28, 8.4.1 - 8.4.15, 8.5.0
str_replace() expects at least 3 arguments, 1 given Too few arguments to function stuff(), 1 passed in /in/3G8EO on line 11 and at least 4 expected

preferences:
58.84 ms | 406 KiB | 5 Q