3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = array( '$empty' => array(), '$full' => range(1, 10), ); $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("%.2F sec total, %.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.3.10.0170.30316.50
7.3.00.0070.29216.36
7.2.130.0130.30416.86
7.2.120.0070.33516.69
7.2.110.0100.32716.70
7.2.100.0170.33916.68
7.2.90.0100.30316.98
7.2.80.0070.29916.89
7.2.70.0200.28716.64
7.2.60.0130.31416.64
7.2.50.0130.31416.87
7.2.40.0130.29916.63
7.2.30.0070.30716.54
7.2.20.0130.30316.79
7.2.10.0100.29416.21
7.2.00.0050.31918.13
7.1.250.0030.78315.59
7.1.70.0000.25317.27
7.1.60.0100.27919.82
7.1.50.0170.30616.72
7.1.00.0000.46722.54
7.0.200.0030.31416.91
7.0.140.0030.38022.14
5.4.270.0232.47319.16
5.4.260.0202.48018.72
5.4.250.0072.47719.05
5.4.240.0132.48318.85
5.4.230.0132.44018.81
5.4.220.0202.46318.95
5.4.210.0172.48019.00
5.4.200.0072.47718.89
5.4.190.0232.47318.85
5.4.180.0102.46018.94
5.4.170.0232.47318.80
5.4.160.0272.47019.10
5.4.150.0132.47019.00
5.4.140.0002.46016.24
5.4.130.0172.46716.23
5.4.120.0102.43716.37
5.4.110.0072.48016.27
5.4.100.0102.41716.18
5.4.90.0172.43016.31
5.4.80.0172.42016.29
5.4.70.0102.45016.28
5.4.60.0172.48016.34
5.4.50.0302.46716.40
5.4.40.0172.48016.24
5.4.30.0202.45316.41
5.4.20.0232.47316.40
5.4.10.0232.47316.14
5.4.00.0132.48315.58
5.3.280.0172.48014.27
5.3.270.0232.41314.35
5.3.260.0102.48714.31
5.3.250.0172.48014.41
5.3.240.0172.48014.39
5.3.230.0202.47714.27
5.3.220.0102.47314.21
5.3.210.0102.43014.34
5.3.200.0072.49014.48
5.3.190.0172.48014.46
5.3.180.0202.47714.22
5.3.170.0232.47314.26
5.3.160.0202.47714.27
5.3.150.0172.44014.32
5.3.140.0202.47714.47
5.3.130.0002.48714.34
5.3.120.0132.42714.18
5.3.110.0202.45714.23
5.3.100.0232.47313.75
5.3.90.0232.47313.78
5.3.80.0102.44013.70
5.3.70.0202.47713.73
5.3.60.0132.48313.71
5.3.50.0172.48013.78
5.3.40.0202.47713.63
5.3.30.0072.45313.61
5.3.20.0172.46013.37
5.3.10.0132.48313.44
5.3.00.0132.48313.50

preferences:
43.5 ms | 401 KiB | 5 Q