3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time_start = microtime(true); for($i = 0; $i < 1000000; $i++) { $arr = []; if(empty($arr) === true) {} } $time_end = microtime(true); $time = $time_end - $time_start; echo "empty() w/ exact comparison: $time seconds\n"; $time_start = microtime(true); for($i = 0; $i < 1000000; $i++) { $arr = []; if($arr === array()) {} } $time_end = microtime(true); $time = $time_end - $time_start; echo "exact comparison to new empty array: $time seconds\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)
7.4.60.0110.05016.37
7.4.50.0100.04716.29
7.4.40.0140.04816.50
7.4.30.0100.05116.26
7.4.20.0100.05116.38
7.4.10.0090.05116.21
7.4.00.0080.05116.33
7.3.180.0120.05716.25
7.3.170.0110.05816.40
7.3.160.0130.05916.32
7.3.150.0090.05916.32
7.3.140.0090.05716.31
7.3.130.0140.05416.37
7.3.120.0110.05916.21
7.3.110.0100.06016.28
7.3.100.0120.05716.23
7.3.90.0060.06216.47
7.3.80.0150.05616.33
7.3.70.0110.05916.27
7.3.60.0100.05816.19
7.3.50.0080.06016.28
7.3.40.0080.06216.27
7.3.30.0100.05816.26
7.3.20.0090.05916.28
7.3.10.0150.05316.18
7.3.00.0080.06016.24
7.2.310.0110.09016.67
7.2.300.0070.08316.51
7.2.290.0070.08816.63
7.2.280.0130.07616.38
7.2.270.0130.07616.59
7.2.260.0100.08016.41
7.2.250.0080.08316.50
7.2.240.0200.09016.46
7.2.230.0080.08016.54
7.2.220.0050.08216.46
7.2.210.0150.10116.35
7.2.200.0130.08016.45
7.2.190.0090.08116.48
7.2.180.0080.08416.54
7.2.170.0120.07916.48
7.2.160.0110.08016.57
7.2.150.0100.08116.50
7.2.140.0160.07916.57
7.2.130.0150.07516.53
7.2.120.0120.08416.64
7.2.110.0110.08016.41
7.2.100.0080.08016.62
7.2.90.0070.08116.68
7.2.80.0100.09316.46
7.2.70.0110.07916.46
7.2.60.0170.08716.51
7.2.50.0200.09816.40
7.2.40.0160.07716.36
7.2.30.0210.08716.55
7.2.20.0100.10016.60
7.2.10.0240.08516.71
7.2.00.0080.08116.66

preferences:
39.78 ms | 403 KiB | 5 Q