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; } 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.00718.43
8.3.50.0000.01519.95
8.3.40.0120.00319.02
8.3.30.0120.00319.02
8.3.20.0040.00420.51
8.3.10.0030.00523.82
8.3.00.0030.00617.36
8.2.180.0120.00916.75
8.2.170.0120.00322.96
8.2.160.0140.00020.52
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0090.00626.16
8.2.120.0040.00421.26
8.2.110.0030.00622.38
8.2.100.0120.00017.97
8.2.90.0000.00819.38
8.2.80.0030.00617.97
8.2.70.0040.00417.75
8.2.60.0060.00318.03
8.2.50.0000.00918.07
8.2.40.0060.00318.34
8.2.30.0040.00418.32
8.2.20.0040.00418.00
8.2.10.0000.00718.38
8.2.00.0040.00417.99
8.1.280.0090.00625.92
8.1.270.0040.00424.00
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00324.17
8.1.230.0050.00519.27
8.1.220.0000.00817.93
8.1.210.0050.00318.77
8.1.200.0030.00717.35
8.1.190.0000.00817.35
8.1.180.0000.00818.10
8.1.170.0100.00018.86
8.1.160.0000.00822.26
8.1.150.0040.00419.14
8.1.140.0050.00517.60
8.1.130.0030.00318.05
8.1.120.0040.00417.76
8.1.110.0030.00617.59
8.1.100.0040.00417.70
8.1.90.0000.00717.75
8.1.80.0000.00717.58
8.1.70.0000.00717.58
8.1.60.0030.00617.82
8.1.50.0000.00817.78
8.1.40.0000.00817.68
8.1.30.0000.00817.74
8.1.20.0040.00417.95
8.1.10.0000.00817.59
8.1.00.0040.00717.66
8.0.300.0030.00518.77
8.0.290.0000.00717.13
8.0.280.0000.00718.54
8.0.270.0000.00717.52
8.0.260.0000.00617.48
8.0.250.0000.00817.18
8.0.240.0000.00717.21
8.0.230.0040.00417.09
8.0.220.0040.00417.12
8.0.210.0000.00717.03
8.0.200.0000.00817.12
8.0.190.0040.00417.21
8.0.180.0080.00017.02
8.0.170.0080.00017.01
8.0.160.0000.00716.94
8.0.150.0000.00917.10
8.0.140.0000.00817.08
8.0.130.0060.00013.48
8.0.120.0080.00016.98
8.0.110.0040.00417.02
8.0.100.0030.00517.04
8.0.90.0040.00417.25
8.0.80.0100.00717.15
8.0.70.0040.00417.04
8.0.60.0040.00416.95
8.0.50.0040.00417.16
8.0.30.0120.00917.32
8.0.20.0160.00617.40
8.0.10.0080.00017.27
8.0.00.0120.00816.97
7.4.330.0050.00215.00
7.4.320.0000.00616.84
7.4.300.0070.00316.62
7.4.290.0000.00816.59
7.4.280.0040.00416.82
7.4.270.0070.00016.75
7.4.260.0080.00016.74
7.4.250.0040.00416.80
7.4.240.0050.00216.80
7.4.230.0000.00716.77
7.4.220.0130.00616.85
7.4.210.0090.00616.78
7.4.200.0040.00416.70
7.4.160.0110.00616.84
7.4.150.0130.00617.40
7.4.140.0130.00717.86
7.4.130.0100.01016.73
7.4.120.0070.01116.69
7.4.110.0140.00416.67
7.4.100.0090.01216.63
7.4.90.0030.01616.82
7.4.80.0060.01719.39
7.4.70.0110.00716.74
7.4.60.0110.01116.86
7.4.50.0030.00616.74
7.4.40.0080.00816.67
7.4.30.0150.00316.89
7.4.00.0090.00615.33
7.3.330.0030.00313.43
7.3.320.0060.00013.32
7.3.310.0040.00416.55
7.3.300.0000.00916.46
7.3.290.0040.01716.47
7.3.280.0050.00916.47
7.3.270.0090.01217.40
7.3.260.0140.00916.49
7.3.250.0110.00916.57
7.3.240.0120.00616.46
7.3.230.0120.00816.43
7.3.210.0130.00316.75
7.3.200.0090.00919.39
7.3.190.0120.01216.54
7.3.180.0070.01016.34
7.3.170.0090.00916.59
7.3.160.0060.01716.82
7.2.330.0160.00916.88
7.2.320.0100.01416.68
7.2.310.0030.01516.87
7.2.300.0060.01217.07
7.2.290.0030.01416.62
7.2.60.0140.00616.86
7.2.50.0030.01017.14
7.2.00.0130.00019.29
7.1.200.0100.00015.71
7.1.100.0080.00318.17
7.1.70.0060.00617.40
7.1.60.0090.01219.40
7.1.50.0060.01616.86
7.1.00.0070.07722.52
7.0.200.0100.00714.99
7.0.140.0070.07322.04
7.0.110.0730.07020.11
7.0.100.0470.08020.08
7.0.90.0530.06720.01
7.0.80.0470.07720.08
7.0.70.0670.08020.05
7.0.60.0530.07020.21
7.0.50.0500.08320.50
7.0.40.0100.07720.18
7.0.30.0100.08020.27
7.0.20.0100.07320.23
7.0.10.0100.07319.98
7.0.00.0070.09020.38
5.6.280.0030.07320.97
5.6.260.0000.08320.69
5.6.250.0100.08020.70
5.6.240.0100.07320.70
5.6.230.0070.08020.86
5.6.220.0000.05320.65
5.6.210.0070.08020.61
5.6.200.0000.08721.04
5.6.190.0130.06721.01
5.6.180.0100.06021.41
5.6.170.0130.07721.08
5.6.160.0170.07721.40
5.6.150.0070.08721.34
5.6.140.0130.07721.18
5.6.130.0070.08321.32
5.6.120.0000.08721.20
5.6.110.0130.07721.24
5.6.100.0100.08321.00
5.6.90.0100.08321.30
5.6.80.0030.05720.59
5.6.70.0130.07020.79
5.6.60.0170.04720.77
5.6.50.0030.06020.79
5.6.40.0070.05020.55
5.6.30.0070.08020.41
5.6.20.0100.07720.76
5.6.10.0070.04020.55
5.6.00.0100.06320.43
5.5.380.0200.06720.58
5.5.370.0070.08320.45
5.5.360.0070.08720.54
5.5.350.0030.08020.61
5.5.340.0070.08321.06
5.5.330.0070.08021.05
5.5.320.0030.09320.91
5.5.310.0070.08321.08
5.5.300.0170.07020.80
5.5.290.0100.08021.01
5.5.280.0100.04721.16
5.5.270.0100.08320.75
5.5.260.0130.06721.03
5.5.250.0070.07720.61
5.5.240.0130.07320.19
5.5.230.0170.07720.41
5.5.220.0100.05320.21
5.5.210.0070.08020.25
5.5.200.0170.04720.19
5.5.190.0100.07720.19
5.5.180.0030.05720.19
5.5.160.0100.07320.31
5.5.150.0070.08020.25
5.5.140.0000.08320.28
5.5.130.0100.07320.50
5.5.120.0000.06720.28
5.5.110.0100.07720.14
5.5.100.0030.07320.18
5.5.90.0100.07320.14
5.5.80.0130.07020.29
5.5.70.0130.07320.21
5.5.60.0100.07720.24
5.5.50.0030.08020.29
5.5.40.0070.08020.16
5.5.30.0230.04320.27
5.5.20.0130.07020.12
5.5.10.0130.07720.25
5.5.00.0070.07320.21
5.4.450.0100.08019.72
5.4.440.0100.07719.78
5.4.430.0070.08019.46
5.4.420.0030.08719.77
5.4.410.0170.06719.48
5.4.400.0100.07719.38
5.4.390.0070.04719.40
5.4.380.0100.07319.37
5.4.370.0130.06019.10
5.4.360.0070.07719.27
5.4.350.0070.08019.27
5.4.340.0030.08019.02
5.4.320.0070.08019.06
5.4.310.0100.07719.45
5.4.300.0130.07019.40
5.4.290.0070.07319.02
5.4.280.0030.07019.37
5.4.270.0100.08019.41
5.4.260.0070.08019.05
5.4.250.0030.06319.07
5.4.240.0130.06719.41
5.4.230.0070.07719.07
5.4.220.0200.06319.07
5.4.210.0070.07319.11
5.4.200.0130.05719.02
5.4.190.0030.07719.21
5.4.180.0000.08319.01
5.4.170.0170.06719.41
5.4.160.0070.07319.14
5.4.150.0070.07319.25
5.4.140.0070.06716.75
5.4.130.0030.07016.66
5.4.120.0070.05016.74
5.4.110.0030.07716.66
5.4.100.0130.07316.79
5.4.90.0170.06316.39
5.4.80.0100.06716.61
5.4.70.0030.04716.64
5.4.60.0030.07316.58
5.4.50.0030.05016.70
5.4.40.0100.04016.37
5.4.30.0100.07016.52
5.4.20.0030.07316.69
5.4.10.0030.07716.57
5.4.00.0070.07015.88
5.3.290.0070.08314.94
5.3.280.0100.06014.82
5.3.270.0030.07714.75
5.3.260.0100.06714.79
5.3.250.0070.07314.70
5.3.240.0130.06314.83
5.3.230.0070.05014.77
5.3.220.0100.07714.64
5.3.210.0100.07714.65
5.3.200.0100.07014.88
5.3.190.0100.07314.84
5.3.180.0100.06714.67
5.3.170.0070.07014.64
5.3.160.0100.07014.68
5.3.150.0030.07714.75
5.3.140.0100.07714.73
5.3.130.0100.07714.68
5.3.120.0170.06314.65
5.3.110.0100.07314.55
5.3.100.0170.06014.35
5.3.90.0100.07014.25
5.3.80.0070.07314.18
5.3.70.0000.08714.25
5.3.60.0100.06714.10
5.3.50.0030.08314.11
5.3.40.0170.07014.16
5.3.30.0070.08014.00
5.3.20.0130.06313.81
5.3.10.0030.04713.82
5.3.00.0130.06713.79
5.2.170.0070.06311.74
5.2.160.0030.05311.74
5.2.150.0000.06711.74
5.2.140.0100.03311.74
5.2.130.0100.06011.74
5.2.120.0100.05711.74
5.2.110.0030.05711.74
5.2.100.0130.05311.74
5.2.90.0000.04011.74
5.2.80.0030.06011.74
5.2.70.0070.06311.74
5.2.60.0030.06311.74
5.2.50.0130.05011.74
5.2.40.0030.05311.74
5.2.30.0000.03711.74
5.2.20.0130.04711.74
5.2.10.0070.05711.74
5.2.00.0030.03311.74
5.1.60.0030.05711.74
5.1.50.0000.06011.74
5.1.40.0000.06011.74
5.1.30.0000.05011.74
5.1.20.0000.06011.74
5.1.10.0100.05011.74
5.1.00.0000.06011.74
5.0.50.0070.04011.74
5.0.40.0030.04711.74
5.0.30.0070.04711.74
5.0.20.0000.04711.74
5.0.10.0100.03711.74
5.0.00.0030.06311.74
4.4.90.0030.02011.74
4.4.80.0070.03011.74
4.4.70.0100.03011.74
4.4.60.0000.03311.74
4.4.50.0030.03011.74
4.4.40.0070.04311.74
4.4.30.0070.03311.74
4.4.20.0030.03311.74
4.4.10.0000.03711.74
4.4.00.0030.05711.74
4.3.110.0070.03011.74
4.3.100.0070.02711.74
4.3.90.0030.03711.74
4.3.80.0070.04711.74
4.3.70.0030.03311.74
4.3.60.0030.03311.74
4.3.50.0000.03711.74
4.3.40.0100.04311.74
4.3.30.0000.02311.74
4.3.20.0030.03311.74
4.3.10.0030.03311.74
4.3.00.0030.02711.74

preferences:
42.55 ms | 400 KiB | 5 Q