3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string='Nearest Location: 771 km S 43° E of Quezon City 051 km S 66° E of Surigao City 007 km S 51° W of Socorro (Surigao Del Norte) 049 km N 70° E of PFZ EAST MINDANAO SEGMENT'; if(preg_match_all('/^(.*? of) \K.+/m',$string,$out)){ list($location,$distance_bearing)=$out; } var_export($distance_bearing); echo "\n\n"; var_export($location);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => '771 km S 43° E of', 1 => '051 km S 66° E of', 2 => '007 km S 51° W of', 3 => '049 km N 70° E of', ) array ( 0 => 'Quezon City', 1 => 'Surigao City', 2 => 'Socorro (Surigao Del Norte)', 3 => 'PFZ EAST MINDANAO SEGMENT', )

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
168.59 ms | 406 KiB | 5 Q