3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = new \SimpleXMLElement(' <blog-post> <dc:tag xmlns:dc="http://purl.org/dc/elements/1.1/"/> <tag xmlns:dc="http://purl.org/dc/elements/1.1/"/> <dc:tag xmlns:dc="http://purl.org/dc/elements/1.1/"/> <tag xmlns:dc="http://purl.org/dc/elements/1.1/"/> <dc:tag xmlns:dc="http://purl.org/dc/elements/1.1/"/> <tag xmlns:dc="http://purl.org/dc/elements/1.1/"/> <dc:tag xmlns:dc="http://purl.org/dc/elements/1.1/"/> <tag xmlns:dc="http://purl.org/dc/elements/1.1/"/> <dc:tag xmlns:dc="http://purl.org/dc/elements/1.1/"/> <tag xmlns:dc="http://purl.org/dc/elements/1.1/"/> <dc:tag xmlns:dc="http://purl.org/dc/elements/1.1/"/> <tag xmlns:dc="http://purl.org/dc/elements/1.1/"/> </blog-post>' ); $t = microtime(1); for ($i = 0; $i<100000; $i++){ count($xml->xpath('*')); } var_dump(microtime(1)-$t); $t = microtime(1); for ($i = 0; $i<100000; $i++){ $xml->count(); isset($xml->children()->tag); $xml->children()->tag; } var_dump(microtime(1)-$t);

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.00.0000.43415.23
7.3.120.0070.50714.85
7.3.110.0100.44814.74
7.3.100.0000.39115.21
7.3.90.0030.48714.85
7.3.80.0070.30814.64
7.3.70.0030.30515.13
7.3.60.0030.38714.89
7.3.50.0070.33115.05
7.3.40.0100.39414.80
7.3.30.0000.38815.08
7.3.20.0070.32116.72
7.3.10.0000.32116.76
7.3.00.0050.31916.58
7.2.250.0070.47415.51
7.2.240.0030.36915.29
7.2.230.0100.50015.03
7.2.220.0000.45215.31
7.2.210.0000.34515.18
7.2.200.0030.45815.09
7.2.190.0070.38715.46
7.2.180.0070.38814.79
7.2.170.0030.30915.38
7.2.130.0000.33717.12
7.2.120.0130.32017.17
7.2.110.0070.35617.10
7.2.100.0030.31516.94
7.2.90.0160.35616.96
7.2.80.0030.36417.14
7.2.70.0030.34016.95
7.2.60.0130.32417.01
7.2.50.0030.32817.18
7.2.40.0030.33016.90
7.2.30.0030.31816.95
7.2.20.0000.35416.93
7.2.10.0000.33816.76
7.2.00.0030.33416.91
7.1.330.0030.50016.02
7.1.320.0000.51415.98
7.1.310.0070.54316.17
7.1.300.0100.38216.01
7.1.290.0070.35316.08
7.1.280.0070.39015.82
7.1.270.0000.39615.77
7.1.260.0030.36216.01
7.1.250.0070.43016.02
7.1.240.0000.41515.92
7.1.230.0030.39015.88
7.1.220.0030.38915.82
7.1.210.0100.37916.02
7.1.200.0030.41815.80
7.1.190.0070.38515.84
7.1.180.0070.39915.68
7.1.170.0000.41615.87
7.1.160.0100.38515.84
7.1.150.0100.43815.76
7.1.140.0030.41915.82
7.1.130.0030.39416.02
7.1.120.0030.41815.81
7.1.110.0070.38215.74
7.1.100.0100.42215.76
7.1.90.0070.38915.72
7.1.80.0070.40615.79
7.1.70.0230.33816.61
7.1.60.1570.35015.73
7.1.50.0070.36916.53
7.1.40.0070.37915.71
7.1.30.0030.40315.61
7.1.20.0030.39315.93
7.1.10.0030.40915.83
7.1.00.0280.43218.40
7.0.330.0070.39315.46
7.0.320.0030.39315.59
7.0.310.0000.39915.25
7.0.300.0130.42215.47
7.0.290.0030.41315.43
7.0.280.0000.37515.45
7.0.270.0030.38915.44
7.0.260.0030.41515.43
7.0.250.0070.42815.61
7.0.240.0030.41615.50
7.0.230.0130.43115.56
7.0.220.0030.41115.69
7.0.210.0030.43215.46
7.0.200.0050.36416.24
7.0.190.0030.37315.52
7.0.180.0030.43015.43
7.0.170.0000.41015.56
7.0.160.0030.39115.66
7.0.150.0130.36815.82
7.0.140.0420.46818.07
7.0.130.0250.46118.01
7.0.120.0250.43118.08
7.0.110.0200.52917.96
7.0.100.0200.48318.10
7.0.90.0200.47918.01
7.0.80.0430.45318.02
7.0.70.0230.42818.09
7.0.60.0220.46717.95
7.0.50.0350.45518.06
7.0.40.0150.46417.13
7.0.30.0300.43817.11
7.0.20.0280.45617.16
7.0.10.0280.45917.06
7.0.00.0850.45317.04
5.6.380.0000.50914.89
5.6.370.0030.48814.22
5.6.360.0070.47114.40
5.6.350.0100.43614.31
5.6.340.0030.46914.28
5.6.330.0030.48314.67
5.6.320.0030.48914.25
5.6.310.0000.48514.44
5.6.300.0070.50214.83
5.6.290.0080.54517.81
5.6.280.0120.55917.92
5.6.270.0120.54217.84
5.6.260.0130.56317.93
5.6.250.0080.53617.80
5.6.240.0100.54718.04
5.6.230.0070.58017.79
5.6.220.0150.55217.84
5.6.210.0080.60217.70
5.6.200.0070.54817.88
5.6.190.0080.56117.65
5.6.180.0080.56717.69
5.6.170.0070.56317.99
5.6.160.0070.54517.87
5.6.150.0120.55217.70
5.6.140.0100.61317.87
5.6.130.0070.58117.67
5.6.120.0170.61117.68
5.6.110.0100.55917.79
5.6.100.0120.60617.73
5.6.90.0070.56117.90
5.6.80.0070.54817.40
5.6.70.0080.53817.45
5.6.60.0070.52817.37
5.6.50.0080.57717.42
5.6.40.0080.53217.27
5.6.30.0030.55617.47
5.6.20.0030.51817.43
5.6.10.0070.54417.43
5.6.00.0130.52317.58

preferences:
37.2 ms | 400 KiB | 5 Q