3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump(sprintf("('1%1$\')", 'a')); var_dump(sprintf("('1%\')", 'a','b')); var_dump(sprintf("('1%ab", 'a','b')); var_dump(sprintf("('1%)a", 'a','b')); var_dump(sprintf("('1%'ab", 'a','b'));
based on B8L1X
Output for 4.3.0 - 5.2.1, 5.2.3 - 7.1.0
string(5) "('1')" string(5) "('1')" string(4) "('1b" string(4) "('1a" string(4) "('10"
Output for 5.2.2

Process exited with code 137.