3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $num = 5; $location = 'tree'; $format = 'The %2$s contains %1$d monkeys. That\'s a nice %2$s full of %1$d monkeys.'; echo sprintf($format, $num, $location); ?>
based on N6bfH
Output for 4.3.0 - 7.2.0
The tree contains 5 monkeys. That's a nice tree full of 5 monkeys.