3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ids1 = []; function foo(array $ids) { echo(addcslashes('{"ordinal":{"suffix":"{lastDigit, plural, =1 {st} =2 {nd} =3 {rd} other {th}}"},"separators":{"decimalPoint":".","thousandGroup":","},"postfixes":{"thousands":"K","millions":"M","billions":"B"}}')); } foo($ids1);
Output for 8.0.1 - 8.0.23, 8.1.0 - 8.1.10, 8.2rc1
Fatal error: Uncaught ArgumentCountError: addcslashes() expects exactly 2 arguments, 1 given in /in/GY2nK:6 Stack trace: #0 /in/GY2nK(6): addcslashes('{"ordinal":{"su...') #1 /in/GY2nK(9): foo(Array) #2 {main} thrown in /in/GY2nK on line 6
Process exited with code 255.
Output for 7.4.0 - 7.4.30
Warning: addcslashes() expects exactly 2 parameters, 1 given in /in/GY2nK on line 6

preferences:
18.09 ms | 410 KiB | 5 Q