3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $p = array('order_status' => array('google','facebook'), 'agent' => array('Shweta')); function bqs($array, $qs='',$index = false) { foreach($array as $par => $val) { if($index) $par = $index; if(is_array($val)) { $qs .= bqs($val, $qs,$par); } else { $qs .= $par.'='.$val.'&'; } } return $qs; } echo bqs($p);
based on nFW2v
Output for 4.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
order_status=google&order_status=facebook&order_status=google&order_status=facebook&agent=Shweta&
Output for hhvm-3.10.0

Process exited with code 153.