3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $get_string = "TOKEN=EC%2d09F245458F168291J&TIMESTAMP=2015%2d08%2d29T08%3a22%3a55Z&CORRELATIONID=bf30a7057eaa1&ACK=Success&VERSION=78&BUILD=000000"; parse_str($get_string, $get_array); //print_r($get_array); // echo $get_array['ACK']; $post_data=['name'=>'John', 'surname'=>'Doe', 'age'=>36]; $url = "http://myremoteservice/"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); $output = curl_exec($ch); curl_close($ch); echo $output;
based on Y03BZ
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/HCW6p:25 Stack trace: #0 {main} thrown in /in/HCW6p on line 25
Process exited with code 255.
Output for 5.4.0 - 5.6.28
Fatal error: Call to undefined function curl_init() in /in/HCW6p on line 25
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/HCW6p on line 20
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[' in /in/HCW6p on line 20
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/HCW6p on line 20
Process exited with code 255.