3v4l.org

run code in 200+ PHP versions simultaneously
<?php $xml_1 = '<namesilo> <request> <operation>getDomainInfo</operation> <ip>55.555.55.55</ip> </request> <reply> <code>300</code> <detail>success</detail> <created>2009-01-11</created> <expires>2017-01-11</expires> <status>Active</status> <locked>Yes</locked> <private>Yes</private> <auto_renew>Yes</auto_renew> <traffic_type>Forwarded</traffic_type> <email_verification_required>No</email_verification_required> <portfolio>Main Portfolio</portfolio> <forward_url>https://www.namesilo.net</forward_url> <forward_type>Temporary Forward (302)</forward_type> <nameservers> <nameserver position="1">NS1.NAMESILO.COM</nameserver> <nameserver position="2">NS2.NAMESILO.COM</nameserver> </nameservers> <contact_ids> <registrant>444444</registrant> <administrative>555555</administrative> <technical>666666</technical> <billing>7777777</billing> </contact_ids> </reply> </namesilo>'; $xml_2 = '<namesilo><request><operation>checkRegisterAvailability</operation><ip>1.1.1.1</ip></request><reply><code>300</code><detail>success</detail><available><domain price="11.79" premium="0">nononononodneodneond.net</domain></available></reply></namesilo>'; $simple_test_1 = new simplexmlelement($xml_1); $simple_test_2 = new simplexmlelement($xml_2); function formatResponse($data, $assoc = false) { $data = json_decode(json_encode($data)); $data = formatAttributes($data); return json_decode(json_encode($data), $assoc); } function formatAttributes($attributes) { foreach ($attributes as $key => $attribute) { if (is_array($attribute)) { $attributes->{$key} = formatAttributes((object)$attribute); $attributes->{$key} = (array)$attributes->{$key}; } if (is_object($attribute)) { $attributes->{$key} = formatAttributes($attribute); if (isset($attribute->{'@attributes'})) { unset($attributes->{$key}->{'@attributes'}); } } if (!is_scalar($attributes->{$key})) { foreach ($attributes->{$key} as $a_key => $items) { if (!is_scalar($items)) { if (count((array) $items) == 1 && is_array($attributes->{$key})) { $attributes->{$key}[$a_key] = $items->{0}; } if (count((array) $items) == 1 && is_object($attributes->{$key})) { if (isset($items->{0})) { $attributes->{$key}->{$a_key} = $items->{0}; } } } } } } return $attributes; } print_r(formatResponse($simple_test_1)); print_r(formatResponse($simple_test_2));
based on inpUR

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)
7.4.60.0110.00716.73
7.4.50.0120.00816.51
7.4.40.0130.01016.68
7.4.30.0130.00916.59
7.4.20.0170.00616.59
7.4.10.0120.01116.53
7.4.00.0080.01016.75
7.3.180.0130.00916.56
7.3.170.0120.01216.58
7.3.160.0110.00916.58
7.3.150.0110.01116.57
7.3.140.0120.01216.77
7.3.130.0120.01116.57
7.3.120.0100.01116.62
7.3.110.0120.01116.56
7.3.100.0140.01116.54
7.3.90.0130.00916.64
7.3.80.0160.00916.60
7.3.70.0160.01116.64
7.3.60.0130.01216.60
7.3.50.0140.01116.60
7.3.40.0150.00916.65
7.3.30.0130.01116.60
7.3.20.0150.00816.48
7.3.10.0150.01116.56
7.3.00.0150.01016.60
7.2.310.0150.00616.69
7.2.300.0160.00716.90
7.2.290.0120.01016.76
7.2.280.0130.01116.88
7.2.270.0140.01116.76
7.2.260.0150.01016.67
7.2.250.0140.00916.87
7.2.240.0170.00716.83
7.2.230.0150.00716.85
7.2.220.0150.01116.92
7.2.210.0150.01216.78
7.2.200.0160.01216.77
7.2.190.0120.01116.78
7.2.180.0150.01216.83
7.2.170.0120.01216.74
7.2.160.0150.00916.79
7.2.150.0150.01116.72
7.2.140.0150.00916.80
7.2.130.0190.01216.86
7.2.120.0180.01016.86
7.2.110.0180.01016.87
7.2.100.0180.00916.80
7.2.90.0180.01016.83
7.2.80.0170.01016.84
7.2.70.0160.00916.66
7.2.60.0150.01016.80
7.2.50.0170.00816.84
7.2.40.0270.00516.75
7.2.30.0130.01016.76
7.2.20.0220.00916.79
7.2.10.0170.01116.81
7.2.00.0130.00516.78
7.1.330.0200.01215.79
7.1.320.0320.00715.98
7.1.310.0240.00515.82
7.1.300.0200.01315.94
7.1.290.0220.01115.90
7.1.280.0210.01015.86
7.1.270.0290.00015.94
7.1.260.0200.00915.89
7.1.250.0210.01215.93
7.1.240.0250.00615.66
7.1.230.0240.00715.81
7.1.220.0260.00315.82
7.1.210.0380.00415.88
7.1.200.0240.00715.75
7.1.190.0190.00815.77
7.1.180.0260.00715.65
7.1.170.0200.01115.79
7.1.160.0210.00915.78
7.1.150.0190.00915.97
7.1.140.0260.01315.86
7.1.130.0220.00715.71
7.1.120.0240.00815.88
7.1.110.0190.00915.91
7.1.100.0260.00715.79
7.1.90.0180.01115.88
7.1.80.0210.00915.88
7.1.70.0420.00815.86
7.1.60.0240.00615.75
7.1.50.0230.00615.84
7.1.40.0340.00416.01
7.1.30.0200.00915.80
7.1.20.0230.00515.72
7.1.10.0190.01315.78
7.1.00.0210.00915.78
7.0.330.0270.01115.46
7.0.320.0230.01015.48
7.0.310.0230.00815.44
7.0.300.0250.01115.50
7.0.290.0280.00815.46
7.0.280.0170.01215.41
7.0.270.0460.01215.54
7.0.260.0200.00615.51
7.0.250.0250.00515.57
7.0.240.0190.00715.60
7.0.230.0260.00415.55
7.0.220.0210.01015.55
7.0.210.0240.00715.52
7.0.200.0240.00715.63
7.0.190.0180.01115.45
7.0.180.0270.00615.54
7.0.170.0240.00715.66
7.0.160.0240.00815.54
7.0.150.0250.00915.52
7.0.140.0230.01115.55
7.0.130.0260.00815.54
7.0.120.0160.01515.57
7.0.110.0220.00715.49
7.0.100.0270.00415.52
7.0.90.0230.00815.58
7.0.80.0250.00515.60
7.0.70.0330.00915.54
7.0.60.0210.00915.58
7.0.50.0220.01015.46
7.0.40.0220.00615.39
7.0.30.0240.00615.59
7.0.20.0210.00815.46
7.0.10.0240.00715.41
7.0.00.0240.00515.54
5.6.400.0250.01216.31
5.6.390.0250.01116.26
5.6.380.0130.02016.33
5.6.370.0240.01116.29
5.6.360.0220.01016.37
5.6.350.0180.01316.28
5.6.340.0340.01116.43
5.6.330.0170.01316.26
5.6.320.0220.00916.32
5.6.310.0200.01216.48
5.6.300.0220.01216.34
5.6.290.0240.01016.29
5.6.280.0160.01716.40
5.6.270.0200.01316.09
5.6.260.0280.00916.37
5.6.250.0210.01216.24
5.6.240.0250.00816.40
5.6.230.0280.00716.21
5.6.220.0250.01016.22
5.6.210.0170.01616.30
5.6.200.0180.01516.35
5.6.190.0180.01416.20
5.6.180.0240.00816.30
5.6.170.0200.01216.29
5.6.160.0220.00916.18
5.6.150.0210.01216.40
5.6.140.0260.00816.39
5.6.130.0150.01916.27
5.6.120.0270.00816.33
5.6.110.0240.01316.21
5.6.100.0160.01716.14
5.6.90.0190.01216.31
5.6.80.0180.01416.26
5.6.70.0230.00716.32
5.6.60.0250.00816.13
5.6.50.0170.01416.18
5.6.40.0200.01116.29
5.6.30.0190.01216.15
5.6.20.0210.01016.31
5.6.10.0160.01316.11
5.6.00.0220.01116.20
5.5.380.0220.01416.32
5.5.370.0200.01616.27
5.5.360.0190.01516.42
5.5.350.0180.01316.34
5.5.340.0200.01116.11
5.5.330.0230.01016.25
5.5.320.0220.00916.05
5.5.310.0310.00316.06
5.5.300.0200.01316.04
5.5.290.0240.01316.14
5.5.280.0150.01716.21
5.5.270.0250.01016.18
5.5.260.0190.01416.01
5.5.250.0240.00916.14
5.5.240.0150.01616.06
5.5.230.0230.00816.06
5.5.220.0220.01116.05
5.5.210.0200.01215.95
5.5.200.0180.01216.25
5.5.190.0210.01216.14
5.5.180.0210.01016.00
5.5.170.0210.01116.03
5.5.160.0200.01316.06
5.5.150.0240.00816.21
5.5.140.0170.01516.19
5.5.130.0180.01316.08
5.5.120.0200.01416.10
5.5.110.0200.01116.03
5.5.100.0170.01416.21
5.5.90.0200.01316.16
5.5.80.0200.01516.06
5.5.70.0180.01516.20
5.5.60.0190.01716.12
5.5.50.0220.00816.16
5.5.40.0270.00616.05
5.5.30.0210.01116.11
5.5.20.0180.01215.95
5.5.10.0250.00616.04
5.5.00.0160.01616.08
5.4.450.0180.01213.21
5.4.440.0210.00713.03
5.4.430.0150.01012.95
5.4.420.0130.01113.14
5.4.410.0130.01213.09
5.4.400.0150.01013.06
5.4.390.0160.01012.91
5.4.380.0140.01012.98
5.4.370.0170.01012.94
5.4.360.0180.00712.89
5.4.350.0190.00713.11
5.4.340.0160.00912.99
5.4.330.0180.00712.97
5.4.320.0150.01113.03
5.4.310.0190.00912.96
5.4.300.0170.01112.86
5.4.290.0190.00712.94
5.4.280.0110.01413.08
5.4.270.0210.01012.93
5.4.260.0160.01212.96
5.4.250.0180.00813.01
5.4.240.0140.01412.95
5.4.230.0170.00812.95
5.4.220.0210.00613.00
5.4.210.0160.01012.98
5.4.200.0200.00712.89
5.4.190.0200.00613.07
5.4.180.0210.00512.95
5.4.170.0160.00913.05
5.4.160.0110.01313.09
5.4.150.0180.00612.94
5.4.140.0180.00713.02
5.4.130.0150.00913.03
5.4.120.0170.00812.93
5.4.110.0190.00712.85
5.4.100.0180.00613.05
5.4.90.0090.01513.06
5.4.80.0200.00512.92
5.4.70.0160.00812.97
5.4.60.0180.00912.96
5.4.50.0190.00412.93
5.4.40.0150.01113.05
5.4.30.0160.01013.15
5.4.20.0140.01112.88
5.4.10.0160.00812.89
5.4.00.0240.00012.98
5.3.290.0180.01013.45
5.3.280.0210.00713.33
5.3.270.0170.01013.35
5.3.260.0160.01113.47
5.3.250.0220.00413.48
5.3.240.0160.01013.26
5.3.230.0170.01013.28
5.3.220.0170.01013.34
5.3.210.0170.00913.27
5.3.200.0180.00813.21
5.3.190.0150.01113.40
5.3.180.0160.01013.40
5.3.170.0180.00913.54
5.3.160.0160.01213.49
5.3.150.0150.01413.42
5.3.140.0160.01013.54
5.3.130.0160.01113.41
5.3.120.0170.00913.56
5.3.110.0150.01113.41
5.3.100.0170.00813.41
5.3.90.0140.01213.57
5.3.80.0170.00813.19
5.3.70.0100.01513.33
5.3.60.0200.00913.44
5.3.50.0150.01013.32
5.3.40.0270.00313.38
5.3.30.0170.00813.40
5.3.20.0150.00813.37
5.3.10.0210.00513.20
5.3.00.0150.01013.19
5.2.170.0180.00312.39
5.2.160.0120.01012.29
5.2.150.0140.00912.43
5.2.140.0150.00612.31
5.2.130.0160.00712.29
5.2.120.0150.00712.36
5.2.110.0150.00712.30
5.2.100.0130.00912.21
5.2.90.0100.01312.24
5.2.80.0120.01112.20
5.2.70.0120.01012.24
5.2.60.0150.00812.23
5.2.50.0130.01012.25
5.2.40.0090.01612.43
5.2.30.0130.00812.41
5.2.20.0140.00912.20
5.2.10.0160.00712.07
5.2.00.0150.00311.96
5.1.60.0120.00711.96
5.1.50.0080.00811.96
5.1.40.0080.00711.96
5.1.30.0090.00711.96
5.1.20.0100.00811.96
5.1.10.0090.00711.96
5.1.00.0120.00411.96
5.0.50.0110.00311.96
5.0.40.0120.00211.96
5.0.30.0060.00811.96
5.0.20.0090.00511.96
5.0.10.0090.00611.96
5.0.00.0080.00811.96
4.4.90.0050.00411.96
4.4.80.0040.00511.96
4.4.70.0050.00411.96
4.4.60.0060.00311.96
4.4.50.0090.00011.96
4.4.40.0040.00411.96
4.4.30.0070.00111.96
4.4.20.0060.00311.96
4.4.10.0040.00711.96
4.4.00.0020.00611.96
4.3.110.0060.00211.96
4.3.100.0070.00111.96
4.3.90.0070.00111.96
4.3.80.0080.00211.96
4.3.70.0060.00411.96
4.3.60.0050.00511.96
4.3.50.0070.00211.96
4.3.40.0080.00111.96
4.3.30.0060.00211.96
4.3.20.0060.00211.96
4.3.10.0050.00211.96
4.3.00.0000.00711.96