3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "http://www.google.co.in/#hl=en&gs_rn=12&gs_ri=psy-ab&pq=bus%20online%20booking&cp=8&gs_id=20&xhr=t&q=redbus+offer+code&es_nrs=true&pf=p&sclient=psy-ab&oq=redbus+o&gs_l=&pbx=1&bav=on.2,or.r_qf.&bvm=bv.45960087,d.bmk&fp=e8cb228a72cb543b&biw=1280&bih=685"; $string = "http://www.google.co.in/#hl=en&gs_rn=12&gs_ri=psy-ab&pq=bus%20online%20booking&cp=8&gs_id=20&xhr=t&q=redbus+offer+code&es_nrs=true&pf=p&sclient=psy-ab&oq=redbus+o&gs_l=&pbx=1&bav=on.2,or.r_qf.&bvm=bv.45960087,d.bmk&fp=e8cb228a72cb543b&biw=1280&bih=685"; $query = parse_url($string, PHP_URL_FRAGMENT); parse_str($query, $query_array); var_dump($query_array); $regex = "/q=(.*?)&/"; preg_match($regex, $string, $matches); var_dump($matches);
Output for git.master, git.master_jit, rfc.property-hooks
array(19) { ["hl"]=> string(2) "en" ["gs_rn"]=> string(2) "12" ["gs_ri"]=> string(6) "psy-ab" ["pq"]=> string(18) "bus online booking" ["cp"]=> string(1) "8" ["gs_id"]=> string(2) "20" ["xhr"]=> string(1) "t" ["q"]=> string(17) "redbus offer code" ["es_nrs"]=> string(4) "true" ["pf"]=> string(1) "p" ["sclient"]=> string(6) "psy-ab" ["oq"]=> string(8) "redbus o" ["gs_l"]=> string(0) "" ["pbx"]=> string(1) "1" ["bav"]=> string(13) "on.2,or.r_qf." ["bvm"]=> string(17) "bv.45960087,d.bmk" ["fp"]=> string(16) "e8cb228a72cb543b" ["biw"]=> string(4) "1280" ["bih"]=> string(3) "685" } array(2) { [0]=> string(25) "q=bus%20online%20booking&" [1]=> string(22) "bus%20online%20booking" }

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:
50.95 ms | 402 KiB | 8 Q