3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $format = 'The %2$s contains %1$d monkeys. That\'s a nice %2$s full of %1$d monkeys.'; echo sprintf($format, $num, $location); ?>
Output for 5.0.4 - 7.2.0
Notice: Undefined variable: num in /in/N6bfH on line 4 Notice: Undefined variable: location in /in/N6bfH on line 4 The contains 0 monkeys. That's a nice full of 0 monkeys.
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: num in /in/N6bfH on line 4 Notice: Undefined variable: location in /in/N6bfH on line 4 The contains 0 monkeys. That's a nice full of 0 monkeys.