3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = ' <?xml version="1.0" encoding="UTF-8" ?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Body> <OTA_HotelResNotifRS xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.opentravel.org/OTA/2003/05 OTA_HotelResNotifRQ.xsd" TimeStamp="2017-04-25T13:54:59+02:00" Version="1.003" EchoToken="58ff3910062c0"> <Success /> <HotelReservations> <HotelReservation> <UniqueID Type="14" ID="24671-CH108B541" /> <ResGlobalInfo> <HotelReservationIDs> <HotelReservationID ResID_Type="14" ResID_Value="24671-CH108B541" /> </HotelReservationIDs> </ResGlobalInfo> </HotelReservation> </HotelReservations> </OTA_HotelResNotifRS> </SOAP-ENV:Body> </SOAP-ENV:Envelope> '; function parseReservationResponseXML($content) { $content = str_replace('<?xml version="1.0" encoding="UTF-8"?>', '', $content); /* * RateTiger response da xsi eklenince hata aldigimizdan dolayi bu bolum siliniyor. */ $content = str_replace("xsi:schemaLocation='http://www.opentravel.org/OTA/2003/05 OTA_HotelResNotifRQ.xsd'", '', $content); $requestParams = preg_replace("/(<\/?)(\w+):([^>]*>)/", "$1$2$3", $content); try { $xml = new \SimpleXMLElement($requestParams); } catch (\Exception $e) { $xml = null; } $body = (!is_null($xml) && !empty($xml->xpath('//SOAP-ENV:Body')[0])) ? $xml->xpath('//SOAP-ENV:Body')[0] : []; return json_decode(json_encode((array)$body), true); } function getProviderReferenceCode($response) { $response = parseReservationResponseXML($response); if (!empty($response['OTA_HotelResNotifRS']) && !array_key_exists('Success', $response['OTA_HotelResNotifRS'])) { return false; } $providerReferenceCode = (isset($response['OTA_HotelResNotifRS']['HotelReservations']['HotelReservation']['ResGlobalInfo']['HotelReservationIDs']['HotelReservationID']['@attributes']['ResID_Value'])) ? $response['OTA_HotelResNotifRS']['HotelReservations']['HotelReservation']['ResGlobalInfo']['HotelReservationIDs']['HotelReservationID']['@attributes']['ResID_Value'] : false; if (!$providerReferenceCode) { return false; } return $providerReferenceCode; } var_dump(getProviderReferenceCode($xml));

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)
8.3.60.0130.01017.38
8.3.50.0100.01221.39
8.3.40.0150.00019.39
8.3.30.0100.00519.29
8.3.20.0040.00420.55
8.3.10.0030.00622.10
8.3.00.0090.00018.39
8.2.180.0060.01525.92
8.2.170.0100.01022.96
8.2.160.0040.01121.25
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0040.00421.37
8.2.110.0090.00022.45
8.2.100.0060.00618.28
8.2.90.0080.00018.41
8.2.80.0050.00319.36
8.2.70.0050.00318.41
8.2.60.0040.00418.41
8.2.50.0080.00018.30
8.2.40.0040.00422.89
8.2.30.0000.00919.48
8.2.20.0040.00418.38
8.2.10.0080.00018.56
8.2.00.0070.00018.66
8.1.280.0130.01325.92
8.1.270.0070.00724.22
8.1.260.0080.00026.35
8.1.250.0030.00628.09
8.1.240.0040.00422.43
8.1.230.0080.00321.33
8.1.220.0030.00518.03
8.1.210.0040.00419.20
8.1.200.0030.00617.86
8.1.190.0060.00317.72
8.1.180.0040.00418.10
8.1.170.0040.00419.07
8.1.160.0040.00419.10
8.1.150.0050.00320.46
8.1.140.0040.00419.83
8.1.130.0000.00719.36
8.1.120.0050.00317.90
8.1.110.0080.00017.98
8.1.100.0040.00417.88
8.1.90.0000.00717.75
8.1.80.0000.00817.87
8.1.70.0030.00317.81
8.1.60.0040.00417.87
8.1.50.0040.00417.92
8.1.40.0050.00317.82
8.1.30.0050.00317.89
8.1.20.0000.00817.98
8.1.10.0030.00518.03
8.1.00.0000.00817.94
8.0.300.0050.00220.49
8.0.290.0050.00317.25
8.0.280.0050.00318.66
8.0.270.0000.00817.27
8.0.260.0000.00819.36
8.0.250.0030.00317.30
8.0.240.0000.00717.41
8.0.230.0030.00517.29
8.0.220.0040.00417.27
8.0.210.0070.00017.19
8.0.200.0000.00717.30
8.0.190.0030.00617.46
8.0.180.0040.00417.45
8.0.170.0040.00417.46
8.0.160.0060.00317.22
8.0.150.0040.00417.32
8.0.140.0080.00017.40
8.0.130.0060.00013.86
8.0.120.0050.00317.18
8.0.110.0000.00717.30
8.0.100.0050.00317.27
8.0.90.0040.00417.25
8.0.80.0060.00917.27
8.0.70.0030.00617.19
8.0.60.0000.00817.24
8.0.50.0000.00817.46
8.0.30.0100.00617.30
8.0.20.0100.00917.46
8.0.10.0080.00017.25
8.0.00.0170.00717.25
7.4.330.0030.00315.55
7.4.320.0050.00217.02
7.4.300.0000.00616.98
7.4.290.0040.00417.00
7.4.280.0080.00017.14
7.4.270.0000.00717.06
7.4.260.0050.00317.05
7.4.250.0050.00216.97
7.4.240.0040.00417.13
7.4.230.0000.00717.10
7.4.220.0120.00617.16
7.4.210.0040.01317.10
7.4.200.0070.00016.91
7.4.160.0100.00816.97
7.4.150.0110.00717.40
7.4.140.0150.00617.86
7.4.130.0080.01117.06
7.4.120.0130.00816.96
7.4.110.0120.00616.99
7.4.100.0170.00317.09
7.4.90.0090.00917.00
7.4.80.0030.01319.39
7.4.70.0090.00916.95
7.4.60.0090.00616.97
7.4.50.0040.00816.99
7.4.40.0060.01517.07
7.4.30.0070.01017.06
7.4.10.0130.00615.30
7.4.00.0080.00815.29
7.3.330.0030.00313.67
7.3.320.0030.00313.66
7.3.310.0050.00316.80
7.3.300.0040.00416.72
7.3.290.0030.00316.82
7.3.280.0060.01416.83
7.3.270.0140.00417.40
7.3.260.0100.01716.96
7.3.250.0150.00416.87
7.3.240.0150.00316.86
7.3.230.0140.01117.04
7.3.210.0030.01616.93
7.3.200.0090.00817.01
7.3.190.0080.00817.00
7.3.180.0060.01017.04
7.3.170.0000.01916.86
7.3.160.0060.00916.88
7.3.130.0070.01015.37
7.3.120.0070.01115.32
7.3.110.0080.00915.08
7.3.100.0050.00815.19
7.3.90.0050.00815.24
7.3.80.0050.00715.10
7.3.70.0040.01015.13
7.3.60.0060.00715.15
7.3.50.0080.00515.11
7.3.40.0030.01115.18
7.3.30.0080.00715.08
7.3.20.0080.00516.96
7.3.10.0080.00917.03
7.3.00.0070.00617.03
7.2.330.0140.00416.91
7.2.320.0100.00717.09
7.2.310.0070.01017.33
7.2.300.0100.00917.15
7.2.290.0050.01117.05
7.2.260.0070.01315.25
7.2.250.0060.01215.31
7.2.240.0080.00915.30
7.2.230.0090.00615.31
7.2.220.0060.00615.36
7.2.210.0100.00515.49
7.2.200.0060.00915.45
7.2.190.0060.00915.27
7.2.180.0050.01015.29
7.2.170.0040.01115.41
7.2.160.0110.00315.29
7.2.150.0030.01216.96
7.2.140.0090.00317.17
7.2.130.0100.00317.21
7.2.120.0080.00817.27
7.2.110.0000.01417.19
7.2.100.0040.00817.13
7.2.90.0060.00917.24
7.2.80.0060.01017.27
7.2.70.0120.00317.24
7.2.60.0090.01017.12
7.2.50.0030.01017.29
7.2.40.1790.00917.80
7.2.30.0800.01117.68
7.2.20.0780.01017.88
7.2.10.0770.01217.63
7.2.00.0680.00818.55
7.1.330.0030.01016.02
7.1.320.0050.01015.91
7.1.310.0040.00916.19
7.1.300.0070.00616.09
7.1.290.0040.00915.95
7.1.280.0070.00915.97
7.1.270.0070.00816.11
7.1.260.0050.00816.09
7.1.250.0100.00315.99
7.1.240.0040.01115.85
7.1.230.0090.00615.71
7.1.220.0040.01115.98
7.1.210.0070.00715.84
7.1.200.0060.00616.04
7.1.190.0030.00616.10
7.1.180.0040.00716.16
7.1.170.0120.00315.96
7.1.160.1040.00416.62
7.1.150.0790.00916.55
7.1.140.0720.01116.44
7.1.130.0070.00916.60
7.1.120.0110.00516.64
7.1.110.0110.00516.31
7.1.100.0130.00516.31
7.1.90.3190.00816.31
7.1.80.0170.00916.05
7.1.70.0060.00516.47
7.1.60.1480.01022.43
7.1.50.0590.01622.07
7.1.40.0720.01027.86
7.1.30.0420.01227.76
7.1.20.0360.01428.01
7.1.10.0580.00815.82
7.1.00.0220.01216.07
7.0.330.0100.00315.64
7.0.320.0060.00615.58
7.0.310.0030.01015.59
7.0.300.0090.00615.26
7.0.290.1080.00816.41
7.0.280.0080.00815.40
7.0.270.0070.01016.11
7.0.260.0950.01116.26
7.0.250.0110.00916.06
7.0.240.0070.00716.12
7.0.230.0170.01416.07
7.0.220.0130.00915.92
7.0.210.0090.01015.37
7.0.200.0080.00715.87
7.0.190.0770.01515.45
7.0.180.0490.01115.55
7.0.170.0390.00915.59
7.0.160.0660.01115.63
7.0.150.0360.01015.65
7.0.140.0220.01115.68
7.0.130.0280.00615.92
7.0.120.0230.01115.80
7.0.110.0430.00815.81
7.0.100.0290.01015.68
7.0.90.0350.01415.74
7.0.80.0320.00715.78
7.0.70.0180.01115.67
7.0.60.0170.01215.76
7.0.50.0210.01415.75
7.0.40.0190.01015.28
7.0.30.0200.01015.14
7.0.20.0220.01114.99
7.0.10.0200.00715.11
7.0.00.0180.00915.10
5.6.400.0000.01514.69
5.6.390.0090.00614.52
5.6.380.0060.00314.50
5.6.370.0000.01114.38
5.6.360.0030.00714.56
5.6.350.0030.00914.56
5.6.340.0100.00714.54
5.6.330.0110.00314.63
5.6.320.0060.00914.57
5.6.310.0040.01114.69
5.6.300.0140.00014.99
5.6.290.0040.01114.65
5.6.280.0090.00314.87
5.6.270.0030.01314.98
5.6.260.0040.01414.75
5.6.250.0060.00314.59
5.6.240.0030.01014.50
5.6.230.0030.00914.48
5.6.220.0000.00914.59
5.6.210.0100.00314.39
5.6.200.0150.00014.61
5.6.190.0000.01414.64
5.6.180.0130.00014.59
5.6.170.0060.00614.60
5.6.160.0060.00614.36
5.6.150.0000.01014.68
5.6.140.0040.01114.59
5.6.130.0030.01014.66
5.6.120.0090.00314.81
5.6.110.0000.01514.63
5.6.100.0200.00014.43
5.6.90.0100.01014.73
5.6.80.0070.01014.48
5.6.70.0140.00014.27
5.6.60.0060.00914.48
5.6.50.0040.00714.52
5.6.40.0090.00614.66
5.6.30.0000.01814.50
5.6.20.0090.00614.39
5.6.10.0060.00914.43
5.6.00.0090.00614.52

preferences:
60.46 ms | 401 KiB | 5 Q