3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '<?xml version="1.0" encoding="UTF-8"?> <Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><Body><Fault><Code><Value>SOAP-ENV:Receiver</Value></Code><Reason><Text>OMS login failure: Problem in OMS UAMS login - Nested Exception/Error: java.net.ConnectException: Tried all: \'1\' addresses, but could not connect over HTTP to server: \'nlut02hr\', port: \'40100\' </Text></Reason><Role>BEA</Role><Detail><error xmlns:bsl="http://com.amdocs.bss.bsl/"><errorCode>BSL-14002</errorCode><errorMessage>Generic exception returned from external system</errorMessage><detail><fault xmlns:con="http://www.bea.com/wli/sb/context"><errorCode>BEA-380000</errorCode><location><node>getAddOnsRouteNode</node><path>response-pipeline</path></location></fault></detail></error></Detail></Fault></Body></Envelope>' ; $xml = new SimpleXMLElement($str); foreach ($xml->getNamespaces(true) as $ns => $uri) { $str = str_replace(sprintf('%s:', $ns), '', $str); } $xml = new SimpleXMLElement($str); var_dump(objectToArray($xml)); function objectToArray($data) { if (is_object($data)) { $data = get_object_vars((object)$data); } if (is_array($data)) { return array_map('objectToArray', $data); } else { return $data; } }

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.0070.01416.74
8.3.50.0060.01422.89
8.3.40.0070.00718.84
8.3.30.0090.00619.22
8.3.20.0050.00320.41
8.3.10.0040.00423.86
8.3.00.0060.00317.75
8.2.180.0090.01216.88
8.2.170.0100.00622.96
8.2.160.0030.01020.64
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0080.00021.22
8.2.110.0000.00919.52
8.2.100.0090.00317.91
8.2.90.0000.00819.34
8.2.80.0060.00317.97
8.2.70.0000.00817.63
8.2.60.0030.00518.29
8.2.50.0060.00318.07
8.2.40.0040.00418.34
8.2.30.0040.00418.27
8.2.20.0030.00517.87
8.2.10.0030.00518.30
8.2.00.0000.00717.92
8.1.280.0090.00625.92
8.1.270.0050.00324.09
8.1.260.0030.00626.35
8.1.250.0040.00428.09
8.1.240.0060.00321.04
8.1.230.0060.00617.71
8.1.220.0040.00417.90
8.1.210.0000.00818.77
8.1.200.0040.00417.48
8.1.190.0030.00517.60
8.1.180.0040.00418.10
8.1.170.0060.00318.70
8.1.160.0040.00422.30
8.1.150.0070.00019.01
8.1.140.0070.00417.72
8.1.130.0040.00418.05
8.1.120.0050.00317.75
8.1.110.0030.00517.59
8.1.100.0040.00417.57
8.1.90.0000.01017.60
8.1.80.0000.00817.61
8.1.70.0020.00517.58
8.1.60.0040.00417.69
8.1.50.0080.00017.68
8.1.40.0000.00717.75
8.1.30.0060.00317.70
8.1.20.0040.00417.78
8.1.10.0040.00417.63
8.1.00.0030.00517.71
8.0.300.0050.00318.77
8.0.290.0040.00416.88
8.0.280.0070.00018.71
8.0.270.0030.00417.45
8.0.260.0000.00717.51
8.0.250.0000.00717.23
8.0.240.0030.00317.07
8.0.230.0040.00417.16
8.0.220.0040.00417.14
8.0.210.0000.00816.98
8.0.200.0070.00017.18
8.0.190.0050.00317.23
8.0.180.0040.00417.20
8.0.170.0000.00817.19
8.0.160.0070.00017.05
8.0.150.0030.00616.98
8.0.140.0090.00316.90
8.0.130.0080.00013.59
8.0.120.0030.00617.10
8.0.110.0000.00817.03
8.0.100.0050.00317.07
8.0.90.0070.00017.07
8.0.80.0120.00617.04
8.0.70.0040.00517.07
8.0.60.0050.00217.16
8.0.50.0040.00417.11
8.0.30.0210.00417.33
8.0.20.0220.01517.40
8.0.10.0050.00317.15
8.0.00.0110.01016.84
7.4.330.0030.00315.23
7.4.320.0000.00616.74
7.4.300.0000.00716.76
7.4.290.0000.00816.80
7.4.280.0000.00816.81
7.4.270.0030.00316.67
7.4.260.0000.00716.81
7.4.250.0040.00416.61
7.4.240.0020.00516.76
7.4.230.0040.00416.54
7.4.220.0120.00616.77
7.4.210.0000.01616.84
7.4.200.0000.00716.58
7.4.160.0080.00816.88
7.4.150.0100.01117.40
7.4.140.0120.01317.86
7.4.130.0110.00716.84
7.4.120.0080.01016.79
7.4.110.0120.00616.56
7.4.100.0060.01216.64
7.4.90.0140.01216.59
7.4.80.0120.00619.39
7.4.70.0030.01416.71
7.4.60.0160.00616.55
7.4.50.0040.00416.84
7.4.40.0070.01016.75
7.4.30.0030.01316.69
7.4.00.0030.00914.92
7.3.330.0030.00313.55
7.3.320.0000.00513.21
7.3.310.0000.00716.41
7.3.300.0000.00716.38
7.3.290.0130.00316.50
7.3.280.0100.00616.50
7.3.270.0120.00717.40
7.3.260.0170.00316.68
7.3.250.0100.01116.60
7.3.240.0040.01316.55
7.3.230.0130.00416.74
7.3.210.0070.01016.72
7.3.200.0100.01319.39
7.3.190.0130.00916.54
7.3.180.0090.00616.66
7.3.170.0140.00316.80
7.3.160.0130.00916.66
7.2.330.0130.00616.96
7.2.320.0100.01016.68
7.2.310.0090.01316.68
7.2.300.0070.01116.95
7.2.290.0130.00616.89
7.2.00.0050.00819.50
7.1.100.0030.00818.41
7.1.70.0040.00717.39
7.1.60.0060.01919.40
7.1.50.0120.00917.11
7.1.00.0000.07322.62
7.0.200.0050.00916.54
7.0.140.0000.07722.20
7.0.60.0130.03720.03
7.0.50.0070.05718.05
7.0.40.0170.03320.19
7.0.30.0500.07320.22
7.0.20.0230.07020.29
7.0.10.0130.08320.32
7.0.00.0070.06320.38
5.6.280.0070.07021.11
5.6.210.0030.06320.69
5.6.200.0170.06018.28
5.6.190.0000.04320.58
5.6.180.0230.07320.54
5.6.170.0330.07320.66
5.6.160.0070.06320.65
5.6.150.0030.08018.32
5.6.140.0170.06018.39
5.6.130.0200.07318.41
5.6.120.0100.03721.07
5.6.110.0030.04321.22
5.6.100.0070.09021.03
5.6.90.0100.07021.18
5.6.80.0070.07720.60
5.5.350.0030.08720.43
5.5.340.0030.04018.16
5.5.330.0030.04320.55
5.5.320.0030.05720.34
5.5.310.0270.07320.44
5.5.300.0070.03718.19
5.5.290.0130.08318.04
5.5.280.0100.08021.09
5.5.270.0030.08721.04
5.5.260.0200.07020.79
5.5.250.0070.08320.86
5.5.240.0200.07720.34
5.4.450.0200.04319.70
5.4.440.0230.04719.38
5.4.430.0200.05019.41
5.4.420.0600.05319.66
5.4.410.0230.04019.37
5.4.400.0470.03319.38
5.4.390.0100.05319.34
5.4.380.0770.06018.80
5.4.370.0700.05718.77
5.4.360.0830.05718.78
5.4.350.0930.06018.72
5.4.340.0670.05018.84
5.4.320.0060.04412.70
5.4.310.0080.03512.69
5.4.300.0060.03712.70
5.4.290.0070.03712.69
5.4.280.0050.03712.59
5.4.270.0060.03712.59
5.4.260.0080.03612.59
5.4.250.0060.04112.59
5.4.240.0060.05112.59
5.4.230.0090.03512.59
5.4.220.0050.03912.58
5.4.210.0040.03812.59
5.4.200.0060.04912.58
5.4.190.0100.03312.57
5.4.180.0070.03612.57
5.4.170.0100.03212.59
5.4.160.0060.03712.58
5.4.150.0090.03412.58
5.4.140.0040.03912.26
5.4.130.0060.03512.25
5.4.120.0030.03812.21
5.4.110.0080.03712.20
5.4.100.0080.03412.20
5.4.90.0050.03912.20
5.4.80.0060.03812.20
5.4.70.0050.03612.20
5.4.60.0080.03412.20
5.4.50.0060.03612.20
5.4.40.0080.03412.19
5.4.30.0090.03312.18
5.4.20.0070.05112.19
5.4.10.0030.03812.18
5.4.00.0040.03811.68
5.3.290.0050.04212.94
5.3.280.0070.03712.88
5.3.270.0060.04012.89
5.3.260.0080.03812.89
5.3.250.0070.03712.89
5.3.240.0070.03812.89
5.3.230.0060.03812.88
5.3.220.0070.03712.86
5.3.210.0060.04112.85
5.3.200.0060.03812.85
5.3.190.0090.04212.85
5.3.180.0080.05212.84
5.3.170.0100.04712.85
5.3.160.0080.03412.85
5.3.150.0040.03812.85
5.3.140.0070.03512.84
5.3.130.0040.04112.83
5.3.120.0090.03612.83
5.3.110.0080.04012.83
5.3.100.0060.03612.32
5.3.90.0050.03812.30
5.3.80.0030.03812.29
5.3.70.0060.03612.29
5.3.60.0080.03512.27
5.3.50.0060.03712.23
5.3.40.0060.03912.23
5.3.30.0100.03312.18
5.3.20.0070.04011.96
5.3.10.0070.03411.93
5.3.00.0070.03511.92
5.2.170.0060.0399.42
5.2.160.0050.0299.42
5.2.150.0120.0369.42
5.2.140.0060.0429.41
5.2.130.0070.0409.38
5.2.120.0050.0429.38
5.2.110.0070.0399.39
5.2.100.0070.0279.38
5.2.90.0020.0409.38
5.2.80.0060.0299.37
5.2.70.0040.0319.38
5.2.60.0060.0299.33
5.2.50.0090.0259.30
5.2.40.0050.0299.28
5.2.30.0040.0319.25
5.2.20.0010.0329.24
5.2.10.0050.0299.15
5.2.00.0030.0379.01
5.1.60.0050.0248.29
5.1.50.0020.0278.28
5.1.40.0050.0308.26
5.1.30.0040.0268.61
5.1.20.0050.0338.63
5.1.10.0020.0288.34
5.1.00.0070.0238.34
5.0.50.0060.0186.82
5.0.40.0020.0216.68
5.0.30.0010.0346.49
5.0.20.0050.0206.45
5.0.10.0030.0216.44
5.0.00.0020.0326.43
4.4.90.0040.0144.78
4.4.80.0020.0164.75
4.4.70.0010.0174.75
4.4.60.0030.0154.75
4.4.50.0040.0144.77
4.4.40.0010.0274.71
4.4.30.0030.0154.76
4.4.20.0020.0164.85
4.4.10.0010.0174.85
4.4.00.0050.0224.76
4.3.110.0020.0164.67
4.3.100.0020.0154.67
4.3.90.0020.0154.63
4.3.80.0010.0254.59
4.3.70.0010.0164.63
4.3.60.0000.0174.63
4.3.50.0020.0164.63
4.3.40.0030.0234.54
4.3.30.0020.0163.31
4.3.20.0020.0163.29
4.3.10.0010.0163.24
4.3.00.0300.01715.98

preferences:
42.42 ms | 401 KiB | 5 Q