3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = array( '$empty' => array(), '$full' => range(1, 10), ); $count = 1 * 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.4F 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.0070.03419.24
7.1.70.0030.04417.29
7.1.60.0130.06319.25
7.1.50.0030.05516.60
7.1.00.0000.09322.40
7.0.200.0030.05816.61
7.0.140.0000.11322.21
7.0.120.0000.10022.05
7.0.60.0430.10319.90
7.0.50.0100.13017.88
7.0.40.0430.10720.27
7.0.30.0200.09019.96
7.0.20.0300.10720.19
7.0.10.0300.06720.17
7.0.00.0200.07020.08
5.6.280.0030.48720.85
5.6.210.0030.48720.67
5.6.200.0000.47018.21
5.6.190.0370.44020.57
5.6.180.0200.39020.41
5.6.170.0330.44320.63
5.6.160.0300.44020.77
5.6.150.0200.45320.37
5.6.140.0270.40320.18
5.6.130.0270.42020.43
5.6.120.0200.38320.37
5.6.110.0130.42020.42
5.6.100.0230.41320.46
5.6.90.0200.38720.39
5.6.80.0200.36719.50
5.6.70.0200.37319.70
5.6.60.0230.45019.50
5.6.50.0270.42719.75
5.6.40.0330.44719.59
5.6.30.0430.45719.82
5.6.20.0370.40719.74
5.6.10.0300.44019.70
5.6.00.0370.42719.68
5.5.350.0000.46020.37
5.5.340.0070.43718.02
5.5.330.0300.47020.23
5.5.320.0300.45720.44
5.5.310.0270.51720.29
5.5.300.0230.40020.13
5.5.290.0200.37320.17
5.5.280.0270.44720.20
5.5.270.0200.40720.16
5.5.260.0230.39020.16
5.5.250.0170.42020.01
5.5.240.0300.41019.29
5.5.230.0170.40019.36
5.5.220.0270.44719.28
5.5.210.0270.46319.63
5.5.200.0230.44019.26
5.5.190.0330.43019.50
5.5.180.0370.42019.58
5.5.160.0400.43719.55
5.5.150.0300.44019.26
5.5.140.0200.41319.43
5.5.130.0230.39019.51
5.5.120.0470.41719.26
5.5.110.0230.42719.51
5.5.100.0300.43719.43
5.5.90.0330.45019.46
5.5.80.0330.43719.38
5.5.70.0230.39319.15
5.5.60.0200.39019.38
5.5.50.0230.44719.21
5.5.40.0370.44319.45
5.5.30.0300.44319.36
5.5.20.0330.40319.14
5.5.10.0230.40019.27
5.5.00.0470.44019.53
5.4.450.0100.37019.50
5.4.440.0230.36319.44
5.4.430.0170.43019.11
5.4.420.0200.37319.50
5.4.410.0200.43319.38
5.4.400.0200.36319.19
5.4.390.0130.36719.17
5.4.380.0270.48019.13
5.4.370.0270.45319.08
5.4.360.0870.39318.91
5.4.350.0300.44319.14
5.4.340.0470.44319.08
5.4.320.0370.46319.13
5.4.310.0370.42719.18
5.4.300.0230.39719.14
5.4.290.0370.42018.79
5.4.280.0370.45019.09
5.4.270.0400.43018.92
5.4.260.0400.42318.78
5.4.250.0770.40019.08
5.4.240.0330.40019.14
5.4.230.0330.40718.80
5.4.220.0230.43018.79
5.4.210.0200.38719.17
5.4.200.0270.40718.91
5.4.190.0300.43719.17
5.4.180.0270.40319.07
5.4.170.0400.42319.07
5.4.160.0270.44718.79
5.4.150.0300.44019.07
5.4.140.0230.41716.48
5.4.130.0370.43316.24
5.4.120.0300.45016.25
5.4.110.0300.38016.41
5.4.100.0370.42716.39
5.4.90.0300.37316.27
5.4.80.0270.41316.22
5.4.70.0330.44316.39
5.4.60.0330.41316.39
5.4.50.0200.38716.21
5.4.40.0300.40316.36
5.4.30.0330.43016.21
5.4.20.0270.42016.38
5.4.10.0230.39316.28
5.4.00.0170.39715.61
5.3.290.0330.44014.50
5.3.280.0230.44314.47
5.3.270.0270.39314.55
5.3.260.0270.38014.44
5.3.250.0200.43714.53
5.3.240.0330.41714.57
5.3.230.0370.44014.54
5.3.220.0370.44314.49
5.3.210.0300.41714.48
5.3.200.0230.44014.49
5.3.190.0270.37714.35
5.3.180.0200.36014.65
5.3.170.0300.43014.50
5.3.160.0300.41314.38
5.3.150.0170.41314.48
5.3.140.0370.43714.49
5.3.130.0300.43714.47
5.3.120.0300.44314.44
5.3.110.0330.45314.47
5.3.100.0170.37714.00
5.3.90.0170.39313.80
5.3.80.0100.38713.85
5.3.70.0170.38313.84
5.3.60.0200.39313.94
5.3.50.0130.37713.89
5.3.40.0170.37713.87
5.3.30.0730.38713.84
5.3.20.0230.41313.66
5.3.10.0170.39713.58
5.3.00.0330.44013.59
5.2.170.0130.38012.21
5.2.160.0130.47712.21
5.2.150.0100.40312.21
5.2.140.0170.40712.21
5.2.130.1170.40312.21
5.2.120.0170.45712.21
5.2.110.0200.42712.21
5.2.100.0300.45012.21
5.2.90.0300.41312.21
5.2.80.0330.43712.21
5.2.70.0230.44012.21
5.2.60.0230.51012.21
5.2.50.0300.42012.21
5.2.40.0230.43312.21
5.2.30.0130.40012.21
5.2.20.0200.44012.21
5.2.10.0230.36312.21
5.2.00.0170.38312.21
5.1.60.0170.51312.21
5.1.50.0200.47012.21
5.1.40.0230.52012.21
5.1.30.0270.52312.21
5.1.20.0200.52712.21
5.1.10.0200.47712.21
5.1.00.1070.50712.21
5.0.50.0070.72712.21
5.0.40.0130.66312.21
5.0.30.0170.61012.21
5.0.20.0100.67712.21
5.0.10.0070.59012.21
5.0.00.0100.60012.21
4.4.90.0170.67312.21
4.4.80.0070.63012.21
4.4.70.0130.66712.21
4.4.60.0100.69712.21
4.4.50.0070.69012.21
4.4.40.0130.63712.21
4.4.30.0100.65712.21
4.4.20.0100.67012.21
4.4.10.0200.69312.21
4.4.00.0100.68012.21
4.3.110.0100.68312.21
4.3.100.0100.66712.21
4.3.90.0000.63312.21
4.3.80.0070.68312.21
4.3.70.0070.67012.21
4.3.60.0070.60012.21
4.3.50.0100.73712.21
4.3.40.0070.63312.21
4.3.30.0030.66312.21
4.3.20.0900.63012.21
4.3.10.0000.63312.21
4.3.00.0070.66312.21

preferences:
37.32 ms | 401 KiB | 5 Q