3v4l.org

run code in 300+ PHP versions simultaneously
<?php //Store your XML Request in a variable $input_xml = '<AvailRequest> <Trip>ONE</Trip> <Origin>BOM</Origin> <Destination>JFK</Destination> <DepartDate>2013-09-15</DepartDate> <ReturnDate>2013-09-16</ReturnDate> <AdultPax>1</AdultPax> <ChildPax>0</ChildPax> <InfantPax>0</InfantPax> <Currency>INR</Currency> <PreferredClass>E</PreferredClass> <Eticket>true</Eticket> <Clientid>777ClientID</Clientid> <Clientpassword>*Your API Password</Clientpassword> <Clienttype>ArzooINTLWS1.0</Clienttype> <PreferredAirline></PreferredAirline> </AvailRequest>'; //Now I've made a little changes in the above curl_setopt declaration as follows: $url = "http://59.162.33.102:9301/Avalability"; //setting the curl parameters. $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); // Following line is compulsary to add as it is: curl_setopt($ch, CURLOPT_POSTFIELDS, "xmlRequest=" . $input_xml); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 300); $data = curl_exec($ch); curl_close($ch); //convert the XML result into array $array_data = json_decode(json_encode(simplexml_load_string($data)), true); print_r('<pre>'); print_r($array_data); print_r('</pre>'); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/Cd9Cf:26 Stack trace: #0 {main} thrown in /in/Cd9Cf on line 26
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
43.21 ms | 401 KiB | 8 Q