3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myArray = ['yellow', 'green', 'red', 'purple']; $myString = 'banana is ?, apple is ?, tomato is ?'; vprintf( str_replace('?', '%s', $myString), $myArray );

preferences:
23.9 ms | 405 KiB | 5 Q