3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Example array $array = array( 'egg' => true, 'cheese' => false, 'hair' => 765, 'goblins' => null, 'ogres' => 'no ogres allowed in this array' ); // Loose checking -- return values are in comments print "Loose checking\n"; // First three make sense, last four do not var_dump(in_array(null, $array)); // true var_dump(in_array(false, $array)); // true var_dump(in_array(765, $array)); // true var_dump(in_array(763, $array)); // true var_dump(in_array('egg', $array)); // true var_dump(in_array('hhh', $array)); // true var_dump(in_array(array(), $array)); // true // Strict checking print "\n\nStrict checking\n"; var_dump(in_array(null, $array, true)); // true var_dump(in_array(false, $array, true)); // true var_dump(in_array(765, $array, true)); // true var_dump(in_array(763, $array, true)); // false var_dump(in_array('egg', $array, true)); // false var_dump(in_array('hhh', $array, true)); // false var_dump(in_array(array(), $array, true)); // false

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.4.10.0100.00619.53
8.3.140.0000.00816.72
8.3.130.0080.00016.51
8.3.120.0090.00620.71
8.3.110.0060.00320.94
8.3.100.0080.00318.59
8.3.90.0040.01126.77
8.3.80.0060.00317.97
8.3.70.0120.00318.30
8.3.60.0120.00316.50
8.3.50.0090.01121.92
8.3.40.0000.01518.47
8.3.30.0070.00718.71
8.3.20.0040.00420.16
8.3.10.0050.00220.16
8.3.00.0070.00021.85
8.2.250.0080.00816.61
8.2.240.0030.00617.12
8.2.230.0090.00022.58
8.2.220.0030.00624.06
8.2.210.0090.00926.77
8.2.200.0090.00016.75
8.2.190.0120.00316.58
8.2.180.0070.00718.41
8.2.170.0070.00722.96
8.2.160.0030.01020.39
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00420.45
8.2.120.0040.00426.35
8.2.110.0070.00322.15
8.2.100.0090.00317.72
8.2.90.0030.00619.04
8.2.80.0050.00317.97
8.2.70.0080.00017.49
8.2.60.0030.00617.93
8.2.50.0040.00418.07
8.2.40.0000.00918.22
8.2.30.0050.00218.02
8.2.20.0030.00618.12
8.2.10.0000.00718.02
8.2.00.0000.00818.18
8.1.300.0000.00918.15
8.1.290.0060.00330.84
8.1.280.0040.01525.92
8.1.270.0000.00823.99
8.1.260.0040.00426.35
8.1.250.0150.00028.09
8.1.240.0000.00920.66
8.1.230.0030.00717.64
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0040.00417.35
8.1.190.0040.00417.10
8.1.180.0030.00618.10
8.1.170.0060.00318.50
8.1.160.0040.00718.78
8.1.150.0020.00520.28
8.1.140.0000.00719.61
8.1.130.0030.00320.84
8.1.120.0030.00517.42
8.1.110.0040.00417.41
8.1.100.0040.00417.43
8.1.90.0040.00417.32
8.1.80.0070.00017.41
8.1.70.0030.00317.30
8.1.60.0060.00317.55
8.1.50.0040.00417.45
8.1.40.0040.00417.39
8.1.30.0030.00517.58
8.1.20.0000.00817.67
8.1.10.0040.00417.52
8.1.00.0000.00717.32
8.0.300.0030.00519.78
8.0.290.0040.00416.63
8.0.280.0080.00018.53
8.0.270.0070.00017.26
8.0.260.0030.00317.18
8.0.250.0060.00316.81
8.0.240.0060.00316.79
8.0.230.0000.00716.96
8.0.220.0000.00916.68
8.0.210.0000.00716.85
8.0.200.0060.00016.79
8.0.190.0000.00816.80
8.0.180.0070.00016.86
8.0.170.0030.00516.96
8.0.160.0070.00016.84
8.0.150.0060.00316.79
8.0.140.0000.00716.83
8.0.130.0000.00613.27
8.0.120.0040.00416.82
8.0.110.0030.00316.79
8.0.100.0040.00416.89
8.0.90.0000.00816.70
8.0.80.0120.01216.84
8.0.70.0000.00716.80
8.0.60.0050.00316.89
8.0.50.0040.00416.66
8.0.30.0100.00817.04
8.0.20.0120.00717.40
8.0.10.0070.00016.88
8.0.00.0090.00916.88
7.4.330.0000.00515.55
7.4.320.0000.00616.56
7.4.300.0060.00016.35
7.4.290.0040.00416.52
7.4.280.0000.00816.35
7.4.270.0030.00316.38
7.4.260.0090.00216.54
7.4.250.0070.00016.49
7.4.240.0070.00016.56
7.4.230.0030.00316.45
7.4.220.0140.00416.60
7.4.210.0110.00316.59
7.4.200.0040.00416.56
7.4.160.0110.00716.43
7.4.150.0090.00917.40
7.4.140.0110.01217.86
7.4.130.0080.01316.42
7.4.120.0120.00916.42
7.4.110.0130.01016.56
7.4.100.0080.00816.43
7.4.90.0160.00316.59
7.4.80.0070.01019.39
7.4.70.0130.00516.43
7.4.60.0110.00416.44
7.4.50.0070.00216.67
7.4.40.0110.00516.47
7.4.30.0030.01316.55
7.4.00.0030.01515.09
7.3.330.0000.00613.07
7.3.320.0040.00313.07
7.3.310.0000.00716.12
7.3.300.0030.00316.19
7.3.290.0060.00816.14
7.3.280.0100.00916.15
7.3.270.0040.01317.40
7.3.260.0120.00916.40
7.3.250.0090.00816.33
7.3.240.0110.00516.28
7.3.230.0160.00616.39
7.3.210.0040.01116.46
7.3.200.0110.00716.16
7.3.190.0000.01816.48
7.3.180.0090.00716.47
7.3.170.0080.00816.40
7.3.160.0100.01016.41
7.2.330.0090.00916.68
7.2.320.0060.01216.71
7.2.310.0080.00816.24
7.2.300.0030.02316.49
7.2.290.0100.00616.44
7.2.60.0040.01116.75
7.2.00.0080.00419.06
7.1.200.0030.01015.76
7.1.100.0030.00918.22
7.1.70.0100.00716.73
7.1.60.0030.00717.02
7.1.50.0140.01016.80
7.1.30.3870.05736.50
7.1.20.4800.06336.39
7.1.10.4300.08020.41
7.1.00.5700.08320.61
7.0.200.0000.01716.82
7.0.170.4270.07020.07
7.0.160.5270.06320.10
7.0.150.4030.06020.10
7.0.140.5930.05320.05
7.0.130.5570.06020.13
7.0.120.6470.06320.05
7.0.110.5270.06720.06
7.0.100.0200.08020.23
7.0.90.0170.08320.25
7.0.80.0800.07320.09
7.0.70.0330.06720.18
7.0.60.0200.05320.00
7.0.50.0130.08320.25
7.0.40.4530.06320.11
7.0.30.6830.06720.16
7.0.20.0200.09019.98
7.0.10.0200.05320.13
7.0.00.0170.05719.97

preferences:
60.68 ms | 403 KiB | 5 Q