3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $data = array( 'user' => array( 'name' => 'Bob Smith', 'age' => 47.7, 'sex' => 'M', 'do.b' => '5/12/1956', 'isHuman' => false, ), 'pastimes' => array('golf', 'opera', 'poker', 'rap'), 'children' => array( 'bobby' => array('age'=>12, 'sex'=>'M'), 'sally' => array('age'=>8, 'sex'=>'F') ), 'CEO' ); echo http_build_query($data);
based on NsC0v
Output for 7.1.25 - 7.3.5
user%5Bname%5D=Bob+Smith&user%5Bage%5D=47.7&user%5Bsex%5D=M&user%5Bdo.b%5D=5%2F12%2F1956&user%5BisHuman%5D=0&pastimes%5B0%5D=golf&pastimes%5B1%5D=opera&pastimes%5B2%5D=poker&pastimes%5B3%5D=rap&children%5Bbobby%5D%5Bage%5D=12&children%5Bbobby%5D%5Bsex%5D=M&children%5Bsally%5D%5Bage%5D=8&children%5Bsally%5D%5Bsex%5D=F&0=CEO