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"; var_dump(parse_url($string)); $regex = "/q=(.*?)&/"; preg_match($regex, $string, $matches); var_dump($matches);
Output for git.master, git.master_jit, rfc.property-hooks
array(4) { ["scheme"]=> string(4) "http" ["host"]=> string(16) "www.google.co.in" ["path"]=> string(1) "/" ["fragment"]=> string(226) "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" } 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:
44.93 ms | 402 KiB | 8 Q