3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = array( '$empty' => array(), '$full' => range(1, 100), ); $count = 10 * 1000 * 1000; foreach ($tests as $name => $array) { printf("%-10s", $name); $start = microtime(true); $i = $count; while ($i-- > 0) { (bool) $array; } $total = microtime(true) - $start; printf("%0.3F sec total, %0.4F sec/iter\n", $total, $total / $count); }

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.2.00.0030.37619.37
7.1.70.0070.23616.85
7.1.60.0070.32219.25
7.1.50.0030.29916.95
7.1.00.0000.26022.51
7.0.200.0030.27516.52
7.0.140.0030.34022.05
7.0.120.0030.37022.01
7.0.100.0130.33020.00
7.0.90.0070.30019.93
7.0.80.0070.32719.84
7.0.70.0100.32319.93
7.0.60.0270.28719.96
7.0.50.0070.30020.30
7.0.40.0100.36020.00
7.0.30.0000.32720.11
7.0.20.0030.28020.13
7.0.10.0070.35320.10
7.0.00.0130.33020.07
5.6.280.0032.49720.84
5.6.250.0132.48720.77
5.6.240.0132.48720.63
5.6.230.0102.49020.77
5.6.220.0102.49020.64
5.6.210.0032.49720.59
5.6.200.0032.48021.20
5.6.190.0102.49021.09
5.6.180.0032.49721.08
5.6.170.0072.49321.13
5.6.160.0032.49721.05
5.6.150.0032.49721.14
5.6.140.0072.49321.09
5.6.130.0132.47021.13
5.6.120.0072.47021.04
5.6.110.0102.44721.06
5.6.100.0072.44721.11
5.6.90.0072.47321.11
5.6.80.0072.45020.42
5.6.70.0072.43720.36
5.6.60.0102.47320.35
5.6.50.0032.49720.37
5.6.40.0072.49320.40
5.6.30.0102.49020.30
5.6.20.0032.49720.43
5.6.10.0032.49720.40
5.6.00.0002.45020.38
5.5.380.0072.49320.53
5.5.370.0032.49720.41
5.5.360.0072.42720.58
5.5.350.0132.44020.35
5.5.340.0132.41720.98
5.5.330.0232.43020.98
5.5.320.0232.40321.00
5.5.310.0032.49720.93
5.5.300.0072.49320.90
5.5.290.0272.39020.80
5.5.280.0372.41020.98
5.5.270.0102.40320.79
5.5.260.0272.39020.98
5.5.250.0102.35320.62
5.5.240.0072.49320.31
5.5.230.0002.50020.32
5.5.220.0272.34020.07
5.5.210.0132.39320.33
5.5.200.0072.35020.09
5.5.190.0202.47020.20
5.5.180.0032.49720.13
5.5.160.0072.49320.29
5.5.150.0072.49320.28
5.5.140.0032.49720.20
5.5.130.0072.43020.16
5.5.120.0472.39320.20
5.5.110.0032.49720.30
5.5.100.0372.36020.19
5.5.90.0102.48020.00
5.5.80.0102.47020.10
5.5.70.0102.49020.18
5.5.60.0132.47720.12
5.5.50.0072.49320.11
5.5.40.0402.35020.18
5.5.30.0202.40720.21
5.5.20.0132.48720.07
5.5.10.0032.33019.98
5.5.00.0132.48720.04
5.4.450.0072.49319.34
5.4.440.0102.43719.25
5.4.430.0032.49719.27
5.4.420.0172.41719.41
5.4.410.0102.39019.21
5.4.400.0102.49019.04
5.4.390.0232.35019.16
5.4.380.0172.42018.87
5.4.370.0202.40018.80
5.4.360.0072.49318.85
5.4.350.0072.49318.91
5.4.340.0102.49018.85
5.4.320.0302.40719.00
5.4.310.0132.48719.11
5.4.300.0072.49318.90
5.4.290.0102.49018.91
5.4.280.0072.49318.99
5.4.270.0102.49019.07
5.4.260.0032.49718.98
5.4.250.0072.49319.00
5.4.240.0132.42718.96
5.4.230.0232.41719.00
5.4.220.0272.40318.79
5.4.210.0072.49318.85
5.4.200.0002.50018.99
5.4.190.0172.41318.86
5.4.180.0132.48718.99
5.4.170.0102.49019.03
5.4.160.0272.42318.82
5.4.150.0102.49018.93
5.4.140.0302.39316.40
5.4.130.0032.49716.17
5.4.120.0102.49016.31
5.4.110.0132.48716.39
5.4.100.0132.44316.36
5.4.90.0072.44316.42
5.4.80.0032.49716.30
5.4.70.0202.40016.42
5.4.60.0072.13716.37
5.4.50.0032.49716.32
5.4.40.0332.41016.36
5.4.30.0102.45316.33
5.4.20.0072.24716.23
5.4.10.0232.40316.36
5.4.00.0072.42315.63
5.3.290.0232.41014.44
5.3.280.0072.49314.41
5.3.270.0032.49714.40
5.3.260.0032.45014.46
5.3.250.0032.49714.37
5.3.240.0132.48714.42
5.3.230.0402.35014.30
5.3.220.0232.42314.23
5.3.210.0072.49314.34
5.3.200.0132.43314.37
5.3.190.0302.41014.27
5.3.180.0202.42014.38
5.3.170.0132.43714.36
5.3.160.0002.50014.22
5.3.150.0002.50014.37
5.3.140.0102.49014.21
5.3.130.0302.42314.34
5.3.120.0072.49314.40
5.3.110.0072.38314.41
5.3.100.0002.44713.91
5.3.90.0132.48013.78
5.3.80.0332.39713.71
5.3.70.0132.42013.71
5.3.60.0132.45013.75
5.3.50.0302.40313.63
5.3.40.0102.43313.51
5.3.30.0102.42713.70
5.3.20.0102.47313.34
5.3.10.0072.46313.30
5.3.00.0102.46013.34
5.2.170.0132.42710.83
5.2.160.0132.44710.85
5.2.150.0072.49310.82
5.2.140.0102.44310.90
5.2.130.0132.42710.88
5.2.120.0002.46010.79
5.2.110.0032.45010.92
5.2.100.0032.44710.83
5.2.90.0232.43710.68
5.2.80.0232.43310.82
5.2.70.0202.41310.87
5.2.60.0202.43010.80
5.2.50.0102.47010.80
5.2.40.0172.42710.75
5.2.30.0202.42310.71
5.2.20.0072.48010.82
5.2.10.0032.47010.70
5.2.00.0032.48010.51
5.1.60.0072.4939.73
5.1.50.0172.4039.91
5.1.40.0402.3739.81
5.1.30.0002.46710.15
5.1.20.0102.41010.23
5.1.10.0302.4339.90
5.1.00.0172.4439.95
5.0.50.0002.5008.41
5.0.40.0102.4178.25
5.0.30.0072.4338.06
5.0.20.0202.4038.07
5.0.10.0032.4478.08
5.0.00.0402.4008.08
4.4.90.0032.4476.75
4.4.80.0032.4677.83
4.4.70.0072.4336.75
4.4.60.0072.4937.83
4.4.50.0032.4436.75
4.4.40.0072.4806.63
4.4.30.0032.4506.64
4.4.20.0072.4936.67
4.4.10.0132.4406.75
4.4.00.0072.4936.67
4.3.110.0002.5006.67
4.3.100.0002.5006.67
4.3.90.0002.4536.75
4.3.80.0132.4206.75
4.3.70.0172.4236.75
4.3.60.0072.4306.75
4.3.50.0132.4276.75
4.3.40.0102.4136.75
4.3.30.0202.3906.75
4.3.20.0172.3836.75
4.3.10.0302.3706.75
4.3.00.0202.4476.75

preferences:
30.92 ms | 400 KiB | 5 Q