3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(sprintf('%2147483648$s, %2$s %1$s', "Sir", "Yes"));
Output for 8.0.12 - 8.0.23, 8.1.0 - 8.1.10
Fatal error: Uncaught ValueError: Argument number specifier must be greater than zero and less than 2147483647 in /in/gs2fF:3 Stack trace: #0 /in/gs2fF(3): sprintf('%2147483648$s, ...', 'Sir', 'Yes') #1 {main} thrown in /in/gs2fF on line 3
Process exited with code 255.
Output for 8.0.0 - 8.0.11
Fatal error: Uncaught ValueError: Argument number must be greater than zero in /in/gs2fF:3 Stack trace: #0 /in/gs2fF(3): sprintf('%2147483648$s, ...', 'Sir', 'Yes') #1 {main} thrown in /in/gs2fF on line 3
Process exited with code 255.
Output for 7.3.0 - 7.3.33, 7.4.0 - 7.4.30
Warning: sprintf(): Argument number must be greater than zero in /in/gs2fF on line 3 bool(false)

preferences:
56.32 ms | 412 KiB | 5 Q