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($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.70.0130.00316.88
8.3.60.0030.01316.63
8.3.50.0140.00822.88
8.3.40.0070.00718.97
8.3.30.0110.00419.08
8.3.20.0040.00420.63
8.3.10.0080.00023.91
8.3.00.0080.00017.63
8.2.180.0120.00316.75
8.2.170.0110.00722.96
8.2.160.0110.00420.65
8.2.150.0030.00524.18
8.2.140.0060.00324.66
8.2.130.0080.00026.16
8.2.120.0050.00321.28
8.2.110.0090.00019.39
8.2.100.0080.00418.09
8.2.90.0030.00519.48
8.2.80.0030.00617.97
8.2.70.0030.00617.75
8.2.60.0040.00418.05
8.2.50.0040.00418.07
8.2.40.0050.00318.47
8.2.30.0070.00018.33
8.2.20.0040.00417.98
8.2.10.0040.00418.32
8.2.00.0000.00818.07
8.1.280.0070.01025.92
8.1.270.0060.00324.04
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0090.00021.24
8.1.230.0090.00317.63
8.1.220.0000.00817.91
8.1.210.0040.00418.77
8.1.200.0040.00417.48
8.1.190.0050.00317.35
8.1.180.0040.00418.10
8.1.170.0030.00718.83
8.1.160.0070.00022.18
8.1.150.0000.00819.12
8.1.140.0000.01017.57
8.1.130.0030.00318.09
8.1.120.0050.00217.73
8.1.110.0000.00817.71
8.1.100.0030.00517.57
8.1.90.0000.00817.60
8.1.80.0000.00717.65
8.1.70.0070.00017.61
8.1.60.0050.00317.72
8.1.50.0030.00617.67
8.1.40.0040.00417.80
8.1.30.0030.00617.88
8.1.20.0000.00817.90
8.1.10.0040.00417.77
8.1.00.0040.00417.70
8.0.300.0040.00418.77
8.0.290.0040.00416.88
8.0.280.0040.00418.68
8.0.270.0000.00717.37
8.0.260.0030.00317.46
8.0.250.0000.00717.20
8.0.240.0070.00017.11
8.0.230.0080.00017.10
8.0.220.0030.00717.07
8.0.210.0040.00417.22
8.0.200.0030.00317.10
8.0.190.0030.00517.09
8.0.180.0040.00417.17
8.0.170.0000.00717.11
8.0.160.0040.00417.00
8.0.150.0050.00317.09
8.0.140.0080.00317.00
8.0.130.0000.00713.62
8.0.120.0000.00817.12
8.0.110.0000.00816.98
8.0.100.0000.00817.07
8.0.90.0070.00016.97
8.0.80.0130.00317.00
8.0.70.0030.00517.05
8.0.60.0070.00017.08
8.0.50.0000.00717.16
8.0.30.0060.01617.16
8.0.20.0230.01117.40
8.0.10.0000.00817.26
8.0.00.0090.01616.84
7.4.330.0000.00515.22
7.4.320.0000.00716.70
7.4.300.0030.00516.83
7.4.290.0000.00716.76
7.4.280.0030.00616.73
7.4.270.0070.00016.86
7.4.260.0000.00716.72
7.4.250.0040.00416.72
7.4.240.0050.00216.76
7.4.230.0050.00316.69
7.4.220.0070.01116.68
7.4.210.0130.00616.86
7.4.200.0000.00816.93
7.4.160.0150.00816.80
7.4.150.0080.01117.40
7.4.140.0130.01217.86
7.4.130.0090.01016.76
7.4.120.0140.00516.62
7.4.110.0140.00316.68
7.4.100.0150.00616.85
7.4.90.0070.01116.64
7.4.80.0170.00619.39
7.4.70.0120.00616.75
7.4.60.0090.01416.65
7.4.50.0080.00016.62
7.4.40.0120.00616.65
7.4.30.0140.00416.84
7.4.00.0030.01315.09
7.3.330.0060.00013.31
7.3.320.0030.00313.41
7.3.310.0000.00716.30
7.3.300.0050.00216.33
7.3.290.0160.00016.44
7.3.280.0080.00916.47
7.3.270.0180.00417.40
7.3.260.0110.00716.79
7.3.250.0100.00816.56
7.3.240.0180.00416.75
7.3.230.0160.00316.48
7.3.210.0070.01116.45
7.3.200.0100.00819.39
7.3.190.0100.01316.77
7.3.180.0100.00616.63
7.3.170.0120.00916.78
7.3.160.0040.01316.79
7.3.10.0110.00616.66
7.3.00.0070.00816.76
7.2.330.0030.01617.00
7.2.320.0110.01316.93
7.2.310.0120.00616.84
7.2.300.0110.00816.96
7.2.290.0140.00317.12
7.2.130.0090.00716.96
7.2.120.0080.00516.95
7.2.110.0070.00616.99
7.2.100.0080.00816.97
7.2.90.0130.00616.88
7.2.80.0090.00717.08
7.2.70.0090.00716.97
7.2.60.0210.00816.96
7.2.50.0080.00717.00
7.2.40.0080.01017.00
7.2.30.0130.00517.07
7.2.20.0080.00616.96
7.2.10.0090.01117.01
7.2.00.0100.00717.56
7.1.250.0090.00415.78
7.1.200.0080.00415.99
7.1.100.0060.00617.98
7.1.70.0000.02116.95
7.1.60.0110.01519.40
7.1.50.0100.01317.16
7.1.00.0000.08022.41
7.0.200.0040.00816.91
7.0.140.0100.06722.05
7.0.60.0070.08320.00
7.0.50.0070.03718.01
7.0.40.0100.07320.23
7.0.30.0300.03720.39
7.0.20.0400.05720.32
7.0.10.0100.06720.32
7.0.00.0000.08020.32
5.6.280.0030.07320.89
5.6.210.0070.08020.82
5.6.200.0130.03718.23
5.6.190.0030.07020.56
5.6.180.0370.07320.56
5.6.170.0270.05320.59
5.6.160.0070.08320.58
5.6.150.0070.06018.33
5.6.140.0070.06718.27
5.6.130.0100.06318.29
5.6.120.0030.08321.19
5.6.110.0070.05321.17
5.6.100.0030.08321.19
5.6.90.0030.08321.01
5.6.80.0070.07020.60
5.5.350.0070.08020.44
5.5.340.0030.04018.10
5.5.330.0030.07320.61
5.5.320.0000.09320.37
5.5.310.0170.03720.30
5.5.300.0170.03018.08
5.5.290.0100.07718.00
5.5.280.0070.05321.02
5.5.270.0100.08320.81
5.5.260.0170.07720.95
5.5.250.0130.07020.71
5.5.240.0100.04320.13
5.4.450.0600.04319.48
5.4.440.0430.03719.48
5.4.430.0430.04719.48
5.4.420.0470.04719.63
5.4.410.0200.03719.27
5.4.400.0670.03319.22
5.4.390.0170.04019.07
5.4.380.0800.05018.75
5.4.370.0730.06318.76
5.4.360.0970.04318.83
5.4.350.0870.04718.77
5.4.340.0470.05718.56
5.4.320.0080.05312.68
5.4.310.0070.05112.68
5.4.300.0090.04212.68
5.4.290.0090.04012.68
5.4.280.0070.04612.57
5.4.270.0030.04112.57
5.4.260.0080.03612.57
5.4.250.0040.04112.57
5.4.240.0080.03912.57
5.4.230.0090.04912.57
5.4.220.0100.04912.57
5.4.210.0070.04312.57
5.4.200.0090.04712.57
5.4.190.0040.03912.57
5.4.180.0090.04012.56
5.4.170.0030.04312.57
5.4.160.0070.04012.57
5.4.150.0050.03612.56
5.4.140.0100.03312.25
5.4.130.0070.03812.23
5.4.120.0050.03612.20
5.4.110.0050.03612.19
5.4.100.0060.03512.18
5.4.90.0070.03512.18
5.4.80.0120.03112.19
5.4.70.0070.03312.19
5.4.60.0130.02712.19
5.4.50.0090.03212.19
5.4.40.0070.03312.18
5.4.30.0080.03312.17
5.4.20.0060.03612.17
5.4.10.0080.03312.17
5.4.00.0060.03711.67
5.3.290.0080.03912.94
5.3.280.0070.03812.86
5.3.270.0060.04112.88
5.3.260.0070.03912.88
5.3.250.0090.04712.88
5.3.240.0070.05312.88
5.3.230.0130.04112.87
5.3.220.0110.05012.84
5.3.210.0110.03512.84
5.3.200.0060.03612.84
5.3.190.0070.03812.84
5.3.180.0090.03412.83
5.3.170.0070.03812.84
5.3.160.0040.04012.84
5.3.150.0100.03312.84
5.3.140.0030.04012.82
5.3.130.0090.03612.82
5.3.120.0050.04112.82
5.3.110.0040.04112.82
5.3.100.0060.03712.31
5.3.90.0060.03612.29
5.3.80.0070.03512.28
5.3.70.0090.04712.28
5.3.60.0090.04112.26
5.3.50.0110.04212.22
5.3.40.0100.04912.21
5.3.30.0060.04512.17
5.3.20.0050.03711.96
5.3.10.0040.03611.91
5.3.00.0060.03611.91
5.2.170.0030.0329.41
5.2.160.0020.0329.41
5.2.150.0090.0269.41
5.2.140.0040.0329.40
5.2.130.0060.0299.36
5.2.120.0050.0299.37
5.2.110.0040.0309.38
5.2.100.0110.0279.37
5.2.90.0080.0349.37
5.2.80.0040.0319.36
5.2.70.0050.0439.36
5.2.60.0080.0289.32
5.2.50.0030.0319.29
5.2.40.0040.0309.26
5.2.30.0050.0359.23
5.2.20.0040.0309.23
5.2.10.0040.0299.13
5.2.00.0050.0299.00
5.1.60.0030.0268.27
5.1.50.0030.0258.27
5.1.40.0030.0268.26
5.1.30.0040.0268.61
5.1.20.0010.0298.62
5.1.10.0050.0258.34
5.1.00.0050.0258.34
5.0.50.0050.0206.81
5.0.40.0010.0216.68
5.0.30.0040.0306.49
5.0.20.0020.0216.46
5.0.10.0030.0216.43
5.0.00.0020.0326.43
4.4.90.0060.0124.78
4.4.80.0020.0154.76
4.4.70.0020.0164.76
4.4.60.0030.0154.75
4.4.50.0030.0154.77
4.4.40.0050.0224.71
4.4.30.0030.0154.76
4.4.20.0030.0174.84
4.4.10.0030.0224.85
4.4.00.0010.0294.76
4.3.110.0040.0164.67
4.3.100.0060.0114.66
4.3.90.0010.0164.63
4.3.80.0030.0244.58
4.3.70.0020.0164.63
4.3.60.0030.0154.62
4.3.50.0040.0154.63
4.3.40.0020.0254.54
4.3.30.0030.0203.30
4.3.20.0060.0183.28
4.3.10.0030.0213.24
4.3.00.0130.01015.98

preferences:
35.73 ms | 401 KiB | 5 Q