3v4l.org

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

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.0100.00718.31
8.3.50.0090.00721.99
8.3.40.0110.01118.70
8.3.30.0100.00319.10
8.3.20.0070.00720.29
8.3.10.0000.00822.09
8.3.00.0050.00322.37
8.2.180.0120.00318.41
8.2.170.0100.00722.96
8.2.160.0140.00020.93
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0030.00519.36
8.2.110.0060.00320.35
8.2.100.0090.00317.85
8.2.90.0040.00418.16
8.2.80.0030.00617.97
8.2.70.0040.00417.50
8.2.60.0000.00817.80
8.2.50.0050.00318.07
8.2.40.0070.00018.16
8.2.30.0040.00418.12
8.2.20.0050.00217.70
8.2.10.0080.00017.54
8.2.00.0050.00617.59
8.1.280.0120.00625.92
8.1.270.0000.00822.02
8.1.260.0030.00726.35
8.1.250.0080.00028.09
8.1.240.0040.00422.20
8.1.230.0070.00420.96
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0030.00717.35
8.1.190.0070.00017.39
8.1.180.0060.00318.45
8.1.170.0000.00818.58
8.1.160.0070.00021.94
8.1.150.0000.00718.46
8.1.140.0050.00217.26
8.1.130.0000.00717.81
8.1.120.0000.00717.44
8.1.110.0000.00717.34
8.1.100.0040.00417.28
8.1.90.0000.00717.40
8.1.80.0030.00317.31
8.1.70.0070.00017.31
8.1.60.0040.00417.58
8.1.50.0040.00417.39
8.1.40.0000.00717.37
8.1.30.0050.00317.54
8.1.20.0040.00417.45
8.1.10.0000.00717.38
8.1.00.0000.00817.30
8.0.300.0040.00420.10
8.0.290.0080.00017.04
8.0.280.0040.00418.50
8.0.270.0030.00317.29
8.0.260.0000.00716.88
8.0.250.0000.00716.86
8.0.240.0040.00416.96
8.0.230.0040.00416.84
8.0.220.0000.00816.80
8.0.210.0040.00416.73
8.0.200.0030.00316.86
8.0.190.0000.00916.75
8.0.180.0050.00516.87
8.0.170.0040.00416.76
8.0.160.0040.00416.82
8.0.150.0030.00316.73
8.0.140.0040.00416.80
8.0.130.0030.00313.32
8.0.120.0000.00816.74
8.0.110.0000.00716.72
8.0.100.0000.00716.69
8.0.90.0000.00716.62
8.0.80.0070.00716.78
8.0.70.0050.00316.76
8.0.60.0040.00216.65
8.0.50.0000.00816.67
8.0.30.0080.01317.11
8.0.20.0080.01017.40
8.0.10.0000.00816.96
8.0.00.0080.01316.87
7.4.330.0030.00315.07
7.4.320.0070.00016.32
7.4.300.0030.00316.42
7.4.290.0040.00416.58
7.4.280.0000.00716.45
7.4.270.0070.00016.42
7.4.260.0000.00716.34
7.4.250.0030.00516.49
7.4.240.0020.00516.35
7.4.230.0070.00016.33
7.4.220.0100.01616.47
7.4.210.0050.01316.56
7.4.200.0000.00816.25
7.4.190.0070.00016.50
7.4.160.0100.00616.60
7.4.150.0120.00617.40
7.4.140.0100.01117.86
7.4.130.0050.01216.32
7.4.120.0100.01016.32
7.4.110.0100.00716.58
7.4.100.0060.01216.56
7.4.90.0090.00916.34
7.4.80.0090.01219.39
7.4.70.0090.01216.27
7.4.60.0060.00916.42
7.4.50.0050.00316.51
7.4.40.0060.00922.77
7.4.30.0060.01016.28
7.4.00.0110.00714.95
7.3.330.0000.00513.03
7.3.320.0000.00513.05
7.3.310.0030.00316.10
7.3.300.0040.00416.00
7.3.290.0070.00716.16
7.3.280.0050.01316.14
7.3.270.0040.01317.40
7.3.260.0110.00816.42
7.3.250.0080.01716.38
7.3.240.0040.01516.53
7.3.230.0190.00316.39
7.3.210.0140.00316.38
7.3.200.0110.00919.39
7.3.190.0140.00316.34
7.3.180.0080.00816.12
7.3.170.0130.00316.45
7.3.160.0120.00316.06
7.3.120.0080.00414.62
7.3.10.0100.00616.79
7.3.00.0040.00816.66
7.2.330.0190.00016.58
7.2.320.0210.00316.47
7.2.310.0120.00916.66
7.2.300.0110.00616.52
7.2.290.0060.01216.55
7.2.130.0030.01016.81
7.2.120.0070.00316.56
7.2.110.0090.00616.70
7.2.100.0030.00716.75
7.2.90.0090.00616.60
7.2.80.0030.00616.64
7.2.70.0090.00616.85
7.2.60.0070.00816.89
7.2.50.0080.00516.79
7.2.40.0060.00316.83
7.2.30.0070.00917.32
7.2.20.0090.00616.32
7.2.10.0090.00616.15
7.2.00.0070.00716.65
7.1.250.0000.01015.54
7.1.200.0070.00315.44
7.1.70.0100.00316.59
7.1.60.0000.01017.19
7.1.50.0060.01816.80
7.1.00.0030.07322.42
7.0.200.0160.00414.66
7.0.140.0070.06321.99
7.0.60.0030.04019.83
7.0.50.0130.03717.87
7.0.40.0000.09320.02
7.0.30.0230.05720.04
7.0.20.0300.04020.16
7.0.10.0200.04720.09
7.0.00.0070.05020.03
5.6.280.0000.07720.91
5.6.210.0130.08720.56
5.6.200.0070.08018.22
5.6.190.0100.04720.56
5.6.180.3430.04320.37
5.6.170.0500.06720.51
5.6.160.0030.08720.55
5.6.150.0100.06718.08
5.6.140.0070.08018.16
5.6.130.0030.08718.17
5.6.120.0100.06020.98
5.6.110.0070.08320.99
5.6.100.0070.08320.98
5.6.90.0030.04321.01
5.6.80.0030.04320.43
5.6.70.4400.03320.27
5.5.350.0000.06720.30
5.5.340.0070.05017.95
5.5.330.0030.04720.46
5.5.320.0300.07720.18
5.5.310.0300.07320.20
5.5.300.0030.04318.01
5.5.290.0130.07317.91
5.5.280.0030.09020.88
5.5.270.0170.06020.97
5.5.260.0170.07720.76
5.5.250.0100.04020.79
5.5.240.0070.05320.23
5.4.450.0470.06319.49
5.4.440.0530.06019.47
5.4.430.0100.05719.15
5.4.420.0070.06019.25
5.4.410.0070.06719.35
5.4.400.1600.00018.51
5.4.390.1330.00018.66
5.4.380.0200.05718.53
5.4.370.1230.06318.83
5.4.360.1070.04718.66
5.4.350.1030.05018.60
5.4.340.1000.05718.72
5.4.320.0080.04512.46
5.4.310.0050.03812.45
5.4.300.0040.04012.45
5.4.290.0040.03912.45
5.4.280.0070.03412.35
5.4.270.0080.03812.35
5.4.260.0070.05018.78
5.4.250.0070.05318.90
5.4.240.0170.04718.65
5.4.230.0170.04718.74
5.4.220.0130.05019.02
5.4.210.0200.06718.88
5.4.200.0100.04718.77
5.4.190.0130.04718.92
5.4.180.0070.05718.83
5.4.170.0130.07019.02
5.4.160.0200.04018.93
5.4.150.0000.06018.75
5.4.140.0070.07716.25
5.4.130.0130.05316.47
5.4.120.0170.04716.21
5.4.110.0130.04316.46
5.4.100.0100.06716.35
5.4.90.0030.06316.50
5.4.80.0070.05016.22
5.4.70.0130.06716.19
5.4.60.0130.04316.27
5.4.50.0070.04716.37
5.4.40.0000.05316.29
5.4.30.0070.05316.46
5.4.20.0070.05016.23
5.4.10.0070.07316.31
5.4.00.0200.04715.77
5.3.290.0050.04012.80
5.3.280.0130.06314.51
5.3.270.0070.08014.62
5.3.260.0130.06014.75
5.3.250.0030.05314.70
5.3.240.0130.04314.45
5.3.230.0070.05314.51
5.3.220.0070.05014.57
5.3.210.0070.07714.56
5.3.200.0100.04714.34
5.3.190.0170.04714.58
5.3.180.0130.04714.59
5.3.170.0100.04714.62
5.3.160.0030.05314.58
5.3.150.0070.05014.57
5.3.140.0070.05014.57
5.3.130.0100.05314.59
5.3.120.0030.07314.46
5.3.110.0130.05714.55
5.3.100.0200.04713.96
5.3.90.0200.05713.91
5.3.80.0100.06014.03
5.3.70.0030.05314.16
5.3.60.0100.06314.01
5.3.50.0030.05013.64
5.3.40.0130.04713.80
5.3.30.0130.04313.61
5.3.20.0170.05313.69
5.3.10.0030.06313.66
5.3.00.0200.06013.64
5.2.170.0070.06011.15
5.2.160.0070.05711.25
5.2.150.0030.04311.07
5.2.140.0030.04311.07
5.2.130.0130.03011.09
5.2.120.0000.04311.00
5.2.110.0030.04711.11
5.2.100.0130.03311.11
5.2.90.0070.04311.11
5.2.80.0030.04311.11
5.2.70.0100.05711.02
5.2.60.0000.04311.15
5.2.50.0070.05011.13
5.2.40.0070.03710.75
5.2.30.0100.04710.87
5.2.20.0070.03710.95
5.2.10.0070.04010.85
5.2.00.0030.04010.80
5.1.60.0030.0439.92
5.1.50.0070.0409.91
5.1.40.0070.0539.86
5.1.30.0130.02710.31
5.1.20.0100.03710.11
5.1.10.0100.0339.98
5.1.00.0000.04010.13
5.0.50.0000.0308.78
5.0.40.0000.0308.50
5.0.30.0030.0508.13
5.0.20.0000.0338.18
5.0.10.0030.0338.25
5.0.00.0030.0578.20
4.4.90.0030.0207.44
4.4.80.0100.0277.44
4.4.70.0030.0237.44
4.4.60.0070.0237.44
4.4.50.0030.0207.44
4.4.40.0130.0337.43
4.4.30.0030.0277.43
4.4.20.0030.0207.44
4.4.10.0030.0207.44
4.4.00.0170.0337.44
4.3.110.0070.0207.44
4.3.100.0030.0207.44
4.3.90.0000.0307.44
4.3.80.0070.0407.44
4.3.70.0100.0237.44
4.3.60.0000.0307.44
4.3.50.0030.0307.44
4.3.40.0100.0337.44
4.3.30.0000.0237.44
4.3.20.0000.0237.44
4.3.10.0100.0137.44
4.3.00.0100.0238.20

preferences:
39.85 ms | 401 KiB | 5 Q