3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = <<<EOD function loadMap() { setTimeout("setMap(39.364016, 3.226783, 'Hotel Casa', 'icon.png', 'key')", 200)} EOD; $pos = strpos($str, "setMap(") + 7; //find position of setMap( $latlon = Substr($str, $pos, strpos($str, ", '")-$pos); // substring from setMap to `, '` List($lat, $lon) = explode(", ", $latlon); // explode the latlon to each variable. Echo $lat . " " . $lon;

preferences:
119.11 ms | 406 KiB | 5 Q