3v4l.org

run code in 300+ PHP versions simultaneously
<?php //namespace A\B; $a = [['x'], ['y'], ['z1'], 1, 2, 3, 4, 5, 'some text']; $time = microtime(true); for ($i=0; $i<1000000; $i++) { \count($a); } echo (microtime(true) - $time) . "\n"; $time = microtime(true); for ($i=0; $i<1000000; $i++) { count($a); } echo (microtime(true) - $time) . "\n";

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.1.30.0170.03217.69
8.1.20.0190.02617.49
8.1.10.0220.02917.47
8.1.00.0170.03417.49
8.0.160.0150.03716.84
8.0.150.0180.02916.69
8.0.140.0180.02816.89
8.0.130.0140.03216.66
8.0.120.0180.02916.73
8.0.110.0170.02816.92
8.0.100.0180.03616.90
8.0.90.0110.03416.89
8.0.80.0200.02916.68
8.0.70.0140.03816.86
8.0.60.0180.02816.82
8.0.50.0160.02916.82
8.0.30.0110.04016.94
8.0.20.0130.03516.87
8.0.10.0170.03116.96
8.0.00.0030.04417.03
7.4.280.0220.03816.43
7.4.270.0160.03916.53
7.4.260.0250.03516.58
7.4.250.0170.03616.52
7.4.240.0070.04016.43
7.4.230.0100.04116.55
7.4.220.0180.03316.60
7.4.210.0100.04116.62
7.4.200.0120.03716.46
7.4.190.0160.03316.67
7.4.180.0240.03316.64
7.4.160.0150.03816.46
7.4.150.0190.04016.52
7.4.140.0140.04316.33
7.4.130.0160.03416.59
7.4.120.0140.04316.30
7.4.110.0260.02716.38
7.4.100.0080.04116.41
7.4.90.0160.03516.52
7.4.80.0150.03316.35
7.4.70.0160.03216.43
7.4.60.0140.03616.35
7.4.50.0150.04116.38
7.4.40.0180.03216.34
7.4.30.0200.03416.52
7.4.20.0110.03616.45
7.4.10.0080.04116.30
7.4.00.0140.03916.14
7.3.330.0150.03416.31
7.3.320.0100.03916.17
7.3.310.0140.04316.28
7.3.300.0150.03316.34
7.3.290.0160.04216.12
7.3.280.0210.04616.11
7.3.270.0170.04916.21
7.3.260.0170.03216.34
7.3.250.0130.05616.35
7.3.240.0150.03916.10
7.3.230.0110.03916.32
7.3.220.0190.03116.18
7.3.210.0140.04216.04
7.3.200.0130.04016.26
7.3.190.0170.05016.16
7.3.180.0140.03616.20
7.3.170.0150.03416.15
7.3.160.0100.03916.04
7.3.150.0100.04316.32
7.3.140.0100.04316.24
7.3.130.0130.04816.17
7.3.120.0100.04915.86
7.3.110.0130.04315.82
7.3.100.0110.05215.92
7.3.90.0040.05115.94
7.3.80.0080.05815.91
7.3.70.0090.05315.85
7.3.60.0090.05115.92
7.3.50.0090.05415.92
7.3.40.0060.05015.90
7.3.30.0100.04215.03
7.3.20.1220.04515.46
7.3.10.0360.04015.46
7.3.00.1490.04015.48
7.2.340.0180.04016.38
7.2.330.0190.04916.23
7.2.320.0190.03216.38
7.2.310.0160.04516.43
7.2.300.0100.03916.54
7.2.290.0220.03716.48
7.2.280.0130.04516.35
7.2.270.0130.05316.46
7.2.260.0120.05116.47
7.2.250.0130.04616.20
7.2.240.0100.05416.10
7.2.230.0110.05616.12
7.2.220.0080.05316.07
7.2.210.0140.04916.21
7.2.200.0080.05216.07
7.2.190.0080.05816.13
7.2.180.0130.05216.11
7.2.170.0150.04316.17
7.2.160.0100.04715.22
7.2.150.0910.04315.69
7.2.140.0250.04515.67
7.2.130.1410.04415.74
7.2.120.1070.05015.75
7.2.110.0620.04515.67
7.2.100.0990.04415.72
7.2.90.1030.04315.73
7.2.80.1210.04315.77
7.2.70.1410.04315.81
7.2.60.1390.04315.79
7.2.50.1350.04415.82
7.2.40.1510.04215.80
7.2.30.0420.04715.80
7.2.20.0930.04315.67
7.2.10.0940.04315.71
7.2.00.0970.04115.76
7.1.330.0100.07615.14
7.1.320.0130.06915.06
7.1.310.0110.08715.10
7.1.300.0100.09215.13
7.1.290.0130.10715.07
7.1.280.0100.07115.14
7.1.270.0270.07414.58
7.1.260.0640.07014.63
7.1.250.1330.06814.62
7.1.240.0450.08514.78
7.1.230.0240.07314.79
7.1.220.0290.07814.83
7.1.210.0270.07714.80
7.1.200.0230.07414.83
7.1.190.0240.07414.78
7.1.180.0290.09014.74
7.1.170.0230.07314.84
7.1.160.0200.08414.80
7.1.150.0250.07314.82
7.1.140.0260.07014.84
7.1.130.0310.07314.71
7.1.120.0220.08014.71
7.1.110.0190.07014.81
7.1.100.0240.07814.79
7.1.90.0270.07414.87
7.1.80.0120.08014.78
7.1.70.0260.06714.74
7.1.60.0220.08414.83
7.1.50.0240.07614.88
7.1.40.0220.06914.80
7.1.30.0280.07114.87
7.1.20.0250.08314.81
7.1.10.0200.07514.77
7.1.00.0200.07714.72

preferences:
35.99 ms | 403 KiB | 5 Q