3v4l.org

run code in 300+ PHP versions simultaneously
<?php <?php /* * Some little $_POST values and $apiKey are already set. */ $_POST['datepicker1'] = '2013-06-12'; $_POST['datepicker2'] = '2013-06-16'; $apiKey = '.....'; $destination = 'napoli'; $adults = '2'; /* * Create the XML for the request with hepl of SimpleXML */ $url = "https://api.eancdn.com/ean-services/rs/hotel/v3/list"; $xml = new SimpleXMLElement('<HotelListRequest/>'); $xml->destinationString = $destination; $xml->arrivalDate = $_POST['datepicker1']; $xml->departureDate = $_POST['datepicker2']; $xml->RoomGroup->Room->numberOfAdults = $adults; /* * Set the parameters for the API request */ $params = [ 'cid' => 55505, 'minorRev' => 99, 'apiKey' => $apiKey, 'locale' => 'it_IT', 'currencyCode' => 'EUR', 'xml' => $xml->asXML(), ]; /* * Set the stream context for the API request */ $context = stream_context_create(['http' => [ 'method' => 'POST', 'header' => [ 'Accept: application/xml', 'Content-Type: application/x-www-form-urlencoded', ], 'content' => http_build_query($params), ]]); libxml_set_streams_context($context); /* * Perform the API request (and here: insert the stylesheet PI) */ $hotel = simplexml_load_file($url, 'MySimpleXMLElement'); $hotel->addProcessingInstruction('xml-stylesheet', 'type="text/xsl" href="css/stile.xsl"'); $hotel->asXML('php://output'); ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.6.140.0170.05318.28
5.6.130.0100.03718.17
5.6.120.0030.07021.02
5.6.110.0070.04321.13
5.6.100.0200.05321.02
5.6.90.0070.08720.98
5.6.80.0100.04020.50
5.5.300.0030.05717.97
5.5.290.0000.08718.00
5.5.280.0100.04320.88
5.5.270.0070.08020.74
5.5.260.0030.09020.88
5.5.250.0100.06720.65
5.5.240.0030.04020.25
5.4.450.0580.06719.47
5.4.440.0820.06419.51
5.4.430.0510.05819.54
5.4.420.0590.05919.58
5.4.410.0510.06119.34
5.4.400.0460.06819.22
5.4.390.0520.05819.07
5.4.380.0520.06319.17
5.4.370.0580.05918.89
5.4.360.0480.06119.01
5.4.350.0530.07119.05
5.4.340.0580.06918.94
5.4.320.0580.05719.13
5.4.310.0560.05318.99
5.4.300.0530.06218.84
5.4.290.0510.05719.13
5.4.280.0560.05318.82
5.4.270.0500.05819.01
5.4.260.0600.05719.01
5.4.250.0590.05419.05
5.4.240.0580.06018.83
5.4.230.0690.06319.01
5.4.220.0440.06019.00
5.4.210.0690.05718.95
5.4.200.0530.05618.34
5.4.190.0570.05819.06
5.4.180.0520.05619.00
5.4.170.0400.05919.00
5.4.160.0380.06118.98
5.4.150.0380.05719.13
5.4.140.0510.06016.38
5.4.130.0490.05916.41
5.4.120.0370.06116.43
5.4.110.0480.05616.23
5.4.100.0480.05416.54
5.4.90.0500.05616.47
5.4.80.0320.05216.42
5.4.70.0330.05316.48
5.4.60.0520.05816.26
5.4.50.0590.05216.49
5.4.40.0590.04816.43
5.4.30.0570.05216.42
5.4.20.0580.05416.46
5.4.10.0580.05716.42
5.4.00.0540.05815.87
5.3.290.0520.06014.58
5.3.280.0520.05914.50
5.3.270.0510.06114.52
5.3.260.0540.05914.59
5.3.250.0640.05314.51
5.3.240.0610.06214.51
5.3.230.0520.05914.56
5.3.220.0460.05914.44
5.3.210.0530.05414.46
5.3.200.0580.05614.45
5.3.190.0480.06714.43
5.3.180.0500.06214.59
5.3.170.0480.04914.46
5.3.160.0460.05614.46
5.3.150.0540.05614.47
5.3.140.0670.06414.57
5.3.130.0500.06214.45
5.3.120.0500.06414.55
5.3.110.0500.06114.43
5.3.100.0530.05413.93
5.3.90.0510.05413.90
5.3.80.0500.06013.97
5.3.70.0660.06113.96
5.3.60.0700.05713.91
5.3.50.0730.05613.80
5.3.40.0460.05713.91
5.3.30.0630.05813.87
5.3.20.0520.05113.64
5.3.10.0640.05313.59
5.3.00.0540.05613.61
5.2.170.0410.05611.09
5.2.160.0410.04011.05
5.2.150.0540.04611.04
5.2.140.0580.05211.20
5.2.130.0670.04911.16
5.2.120.0370.04811.05
5.2.110.0440.04711.03
5.2.100.0490.04611.04
5.2.90.0440.04111.02
5.2.80.0400.04711.09
5.2.70.0440.04311.04
5.2.60.0400.04610.98
5.2.50.0440.04911.05
5.2.40.0310.04410.91
5.2.30.0320.04810.91
5.2.20.0370.04810.89
5.2.10.0400.04310.86
5.2.00.0360.04710.67
5.1.60.0380.03310.00
5.1.50.0290.0389.93
5.1.40.0390.0349.96
5.1.30.0380.04310.30
5.1.20.0310.04010.38
5.1.10.0410.03910.05
5.1.00.0420.0399.98
5.0.50.0240.0268.55
5.0.40.0200.0328.32
5.0.30.0170.0508.10
5.0.20.0200.0288.21
5.0.10.0200.0368.20
5.0.00.0210.0488.19
4.4.90.0110.0275.85
4.4.80.0140.0235.84
4.4.70.0210.0235.83
4.4.60.0170.0225.81
4.4.50.0180.0245.80
4.4.40.0200.0365.86
4.4.30.0110.0265.85
4.4.20.0140.0265.89
4.4.10.0180.0245.91
4.4.00.0210.0385.88
4.3.110.0240.0195.74
4.3.100.0130.0235.79
4.3.90.0190.0235.79
4.3.80.0160.0385.75
4.3.70.0140.0265.75
4.3.60.0220.0205.75
4.3.50.0160.0245.71
4.3.40.0210.0345.74
4.3.30.0120.0224.81
4.3.20.0090.0234.79
4.3.10.0090.0264.74
4.3.00.0070.0295.60

preferences:
145.27 ms | 1394 KiB | 7 Q