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'));
based on DOhKq
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
string(5) "('1')" string(5) "('1')" string(4) "('1b" string(4) "('1a"