3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php declare(strict_types=1); var_dump(http_build_query(['foo' => 'bar'], null));
based on a84Gn
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught TypeError: http_build_query() expects parameter 2 to be string, null given in /in/M0pJO:5 Stack trace: #0 /in/M0pJO(5): http_build_query(Array, NULL) #1 {main} thrown in /in/M0pJO on line 5
Process exited with code 255.
Output for 5.4.2 - 5.6.28
Warning: Unsupported declare 'strict_types' in /in/M0pJO on line 3 string(7) "foo=bar"
Output for 5.3.17 - 5.3.29
Warning: Unsupported declare 'strict_types' in /in/M0pJO on line 3 Parse error: syntax error, unexpected '[', expecting ')' in /in/M0pJO on line 5
Process exited with code 255.