3v4l.org

run code in 300+ PHP versions simultaneously
<?php sprintf('%$1s, %2$s %1$s', "Sir", "Yes");
Output for 8.0.0
Fatal error: Uncaught ValueError: Argument number must be greater than zero in /in/CPIng:3 Stack trace: #0 /in/CPIng(3): sprintf('%$1s, %2$s %1$s', 'Sir', 'Yes') #1 {main} thrown in /in/CPIng on line 3
Process exited with code 255.
Output for 5.2.5 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.7 - 5.6.21, 7.0.0 - 7.0.20, 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.26, 7.4.0 - 7.4.14
Warning: sprintf(): Argument number must be greater than zero in /in/CPIng on line 3
Output for 5.2.1 - 5.2.4
Warning: sprintf(): Argument number must be greater than zero. in /in/CPIng on line 3
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.4, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0
Warning: sprintf(): Zero is not a valid argument number in /in/CPIng on line 3
Output for 4.4.5 - 4.4.9
Warning: sprintf(): Argument number must be greater then zero. in /in/CPIng on line 3
Output for 4.3.0 - 4.3.1
Warning: sprintf() [http://www.php.net/function.sprintf]: Zero is not a valid argument number in /in/CPIng on line 3