3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $params = array_merge($params, [ 'response_type' => 'code', 'client_id' => 'client_id', 'redirect_uri' => 'redirectUri', 'scope' => [], 'access_type' => 'offline' ]); echo 'https://accounts.google.com/o/oauth2/auth'.$paramString = http_build_query($params, null, '&');
Output for 7.0.0 - 7.2.0
Notice: Undefined variable: params in /in/HUkDO on line 3 Warning: array_merge(): Argument #1 is not an array in /in/HUkDO on line 4 Warning: http_build_query(): Parameter 1 expected to be Array or Object. Incorrect value given in /in/HUkDO on line 10 https://accounts.google.com/o/oauth2/auth
Output for 5.4.11 - 5.6.28
Notice: Undefined variable: params in /in/HUkDO on line 3 Warning: array_merge(): Argument #1 is not an array in /in/HUkDO on line 9 Warning: http_build_query(): Parameter 1 expected to be Array or Object. Incorrect value given in /in/HUkDO on line 10 https://accounts.google.com/o/oauth2/auth
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/HUkDO on line 3
Process exited with code 255.