3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "Welcome to [city]. I want [city] to be a random version each time. [city] should not be the same [city] each time."; $keyword = "[city]"; $values = ["Orlando", "Dallas", "Atlanta", "Detroit", "Tampa", "Miami"]; shuffle($values); vprintf( str_replace( $keyword, '%s', $text ), $values );

preferences:
27.5 ms | 406 KiB | 5 Q