3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = [ null, [], ['foo'] ]; foreach ($tests as $test) { echo "\n--------------\n" . var_export($test, true) . " has a boolean value of: " . var_export((bool)$test, true) . " - "; if ($test) { echo "pass"; } else { echo "fail"; } }

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.3.60.0160.00318.43
8.3.50.0210.00017.96
8.3.40.0060.01321.86
8.3.30.0110.00418.72
8.3.20.0030.01424.18
8.3.10.0030.00524.66
8.3.00.0030.00526.16
8.2.180.0110.00425.92
8.2.170.0030.01218.96
8.2.160.0090.00622.96
8.2.150.0090.00025.66
8.2.140.0070.00024.66
8.2.130.0070.00026.16
8.2.120.0080.00026.35
8.2.110.0100.00622.11
8.2.100.0000.01117.72
8.2.90.0040.00417.63
8.2.80.0030.00618.96
8.2.70.0000.00817.49
8.2.60.0000.00817.80
8.2.50.0040.00418.07
8.2.40.0080.00018.22
8.2.30.0000.00818.13
8.2.20.0040.00417.97
8.2.10.0040.00419.15
8.2.00.0040.00419.29
8.1.280.0060.00925.92
8.1.270.0070.00023.99
8.1.260.0000.00728.09
8.1.250.0080.00028.09
8.1.240.0060.00320.40
8.1.230.0060.00617.82
8.1.220.0000.00817.79
8.1.210.0000.00918.77
8.1.200.0060.00317.36
8.1.190.0000.00717.35
8.1.180.0000.00818.10
8.1.170.0030.00618.45
8.1.160.0040.00418.88
8.1.150.0030.00518.88
8.1.140.0040.00418.81
8.1.130.0000.00719.19
8.1.120.0000.00817.49
8.1.110.0060.00317.48
8.1.100.0000.00817.48
8.1.90.0040.00417.48
8.1.80.0040.00417.34
8.1.70.0040.00417.46
8.1.60.0000.00817.59
8.1.50.0040.00417.37
8.1.40.0050.00217.39
8.1.30.0060.00317.71
8.1.20.0080.00017.64
8.1.10.0030.00517.42
8.1.00.0070.00017.27
8.0.300.0040.00418.77
8.0.290.0040.00416.63
8.0.280.0030.00318.43
8.0.270.0040.00418.01
8.0.260.0030.00316.67
8.0.250.0000.00716.95
8.0.240.0040.00416.94
8.0.230.0070.00016.95
8.0.220.0050.00316.87
8.0.210.0070.00016.76
8.0.200.0040.00416.96
8.0.190.0050.00316.97
8.0.180.0000.00716.88
8.0.170.0060.00316.90
8.0.160.0080.00016.89
8.0.150.0040.00416.80
8.0.140.0070.00016.74
8.0.130.0030.00313.30
8.0.120.0040.00416.86
8.0.110.0030.00316.87
8.0.100.0040.00416.79
8.0.90.0000.00716.82
8.0.80.0020.01316.88
8.0.70.0030.00516.69
8.0.60.0000.00716.84
8.0.50.0040.00416.97
8.0.30.0070.01017.03
8.0.20.0070.01217.02
8.0.10.0050.00317.03
8.0.00.0160.00616.84
7.4.330.0000.00515.55
7.4.320.0030.00316.51
7.4.300.0040.00416.63
7.4.290.0030.00316.55
7.4.280.0040.00316.48
7.4.270.0070.00016.50
7.4.260.0050.00013.29
7.4.250.0050.00216.38
7.4.240.0000.00716.61
7.4.230.0040.00416.59
7.4.220.0060.00216.39
7.4.210.0070.00716.60
7.4.200.0000.00716.35
7.4.130.0090.00916.26
7.4.120.0090.01616.27
7.4.110.0050.01616.45
7.4.100.0050.01316.27
7.4.90.0080.01116.48
7.4.80.0130.01016.29
7.4.70.0060.01316.49
7.4.60.0150.00316.25
7.4.50.0140.00716.41
7.4.40.0110.00816.25
7.4.30.0090.01216.52
7.4.20.0140.00416.50
7.4.10.0140.00316.33
7.4.00.0130.00616.64
7.3.330.0030.00316.22
7.3.320.0000.00613.02
7.3.310.0040.00416.32
7.3.300.0040.00416.12
7.3.290.0110.00716.31
7.3.260.0080.01516.34
7.3.250.0090.01316.25
7.3.240.0120.00516.35
7.3.230.0120.00616.41
7.3.220.0040.01516.46
7.3.210.0150.00416.61
7.3.200.0100.01016.13
7.3.190.0090.00816.37
7.3.180.0070.01016.57
7.3.170.0150.00316.47
7.3.160.0120.00816.52
7.3.150.0120.00916.18
7.3.140.0070.01016.46
7.3.130.0110.00616.32
7.3.120.0090.00916.27
7.3.110.0030.01416.38
7.3.100.0090.00916.32
7.3.90.0150.00316.28
7.3.80.0070.01016.28
7.3.70.0070.01116.26
7.3.60.0070.01016.37
7.3.50.0120.00816.48
7.3.40.0060.01316.43
7.3.30.0140.00316.40
7.3.20.0090.00916.34
7.3.10.0110.00616.34
7.3.00.0150.00616.37
7.2.340.0160.00316.62
7.2.330.0060.01116.45
7.2.320.0140.00316.61
7.2.310.0080.01016.61
7.2.300.0180.00016.63
7.2.290.0090.01216.66
7.2.280.0090.00916.38
7.2.270.0060.01116.77
7.2.260.0090.00916.68
7.2.250.0150.00916.26
7.2.240.0030.01416.69
7.2.230.0030.01416.66
7.2.220.0060.01216.60
7.2.210.0000.01916.72
7.2.200.0130.00916.50
7.2.190.0150.00316.45
7.2.180.0100.01016.58
7.2.170.0130.00416.59
7.2.160.0110.00716.53
7.2.150.0120.00616.49
7.2.140.0120.00616.63
7.2.130.0500.00916.63
7.2.120.0100.01016.64
7.2.110.0090.00916.67
7.2.100.0140.00916.49
7.2.90.0060.01516.53
7.2.80.0120.00916.44
7.2.70.0160.00316.62
7.2.60.0130.00716.73
7.2.50.0100.00916.61
7.2.40.0130.00716.62
7.2.30.0080.01116.56
7.2.20.0090.01216.57
7.2.10.0140.00816.61
7.2.00.0080.01116.74

preferences:
60.4 ms | 400 KiB | 5 Q