3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $my_array = array('George' => 1972, 'Sally' => 1975, 'Deepak' => 1980); $my_array['Lucy'] = 1990; print $my_array['Lucy'] . '</br>'; print $my_array['George'] . '</br>'; var_dump($my_array); $company = "broadstreet"; $key = "elvis437tide"; $action = "projects.json"; $channel = curl_init(); curl_setopt( $channel, CURLOPT_URL, "https://". $company .".teamwork.com/". $action ); curl_setopt( $channel, CURLOPT_RETURNTRANSFER, 1 ); curl_setopt( $channel, CURLOPT_HTTPHEADER, array( "Authorization: BASIC ". base64_encode( $key .":xxx" )) ); echo curl_exec ( $channel ); curl_close ( $channel ); echo json_decode($channel);
Output for 7.0.0 - 7.1.0
1990</br>1972</br>array(4) { ["George"]=> int(1972) ["Sally"]=> int(1975) ["Deepak"]=> int(1980) ["Lucy"]=> int(1990) } Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/0gUeD:19 Stack trace: #0 {main} thrown in /in/0gUeD on line 19
Process exited with code 255.
Output for hhvm-3.10.0 - 3.12.0
1990</br>1972</br>array(4) { ["George"]=> int(1972) ["Sally"]=> int(1975) ["Deepak"]=> int(1980) ["Lucy"]=> int(1990) } Warning: json_decode() expects parameter 1 to be string, resource given in /in/0gUeD on line 31
Output for 5.0.0 - 5.6.28
1990</br>1972</br>array(4) { ["George"]=> int(1972) ["Sally"]=> int(1975) ["Deepak"]=> int(1980) ["Lucy"]=> int(1990) } Fatal error: Call to undefined function curl_init() in /in/0gUeD on line 19
Process exited with code 255.
Output for 4.4.5 - 4.4.9
1990</br>1972</br>array(4) { ["George"]=> int(1972) ["Sally"]=> int(1975) ["Deepak"]=> int(1980) ["Lucy"]=> int(1990) } Fatal error: Call to undefined function: curl_init() in /in/0gUeD on line 19
Process exited with code 255.
Output for 4.3.2 - 4.4.4
1990</br>1972</br>array(4) { ["George"]=> int(1972) ["Sally"]=> int(1975) ["Deepak"]=> int(1980) ["Lucy"]=> int(1990) } Fatal error: Call to undefined function: curl_init() in /in/0gUeD on line 19
Process exited with code 255.
Output for 4.3.0 - 4.3.1
1990</br>1972</br>array(4) { ["George"]=> int(1972) ["Sally"]=> int(1975) ["Deepak"]=> int(1980) ["Lucy"]=> int(1990) } Fatal error: Call to undefined function: curl_init() in /in/0gUeD on line 19