3v4l.org

run code in 300+ PHP versions simultaneously
<?php $games = [["First", 1.14], ["2nd", 1.18], ["3rd", 1.22]]; $rand1 = array_rand($games); $rand2 = array_rand($games); $val1 = $games[$rand1][1]; $val2 = $games[$rand2][1]; echo sprintf( "The product of '%s' (%f) and '%s' (%f) is %f", $games[$rand1][0], $val1, $games[$rand2][0], $val2, $val1 * $val2 );

preferences:
23.81 ms | 405 KiB | 5 Q