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 print_r(in_array(763, $array)); // true in_array('egg', $array); // true in_array('hhh', $array); // true 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.0110.00316.50
8.3.50.0110.00522.88
8.3.40.0070.01018.67
8.3.30.0070.00718.92
8.3.20.0070.00020.39
8.3.10.0000.00823.64
8.3.00.0040.00418.98
8.2.180.0120.00316.38
8.2.170.0110.00422.96
8.2.160.0060.00920.38
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0030.01226.16
8.2.120.0000.00821.06
8.2.110.0030.00622.30
8.2.100.0030.00917.84
8.2.90.0080.00019.16
8.2.80.0060.00317.97
8.2.70.0090.00017.63
8.2.60.0050.00317.90
8.2.50.0040.00418.07
8.2.40.0080.00019.79
8.2.30.0040.00417.98
8.2.20.0040.00417.68
8.2.10.0000.00718.05
8.2.00.0000.00717.46
8.1.280.0100.01025.92
8.1.270.0030.00523.84
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00623.96
8.1.230.0100.00018.97
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0040.00417.11
8.1.190.0000.00917.13
8.1.180.0050.00318.10
8.1.170.0050.00518.47
8.1.160.0070.00022.00
8.1.150.0040.00418.81
8.1.140.0070.00017.40
8.1.130.0030.00517.82
8.1.120.0050.00317.38
8.1.110.0000.00817.41
8.1.100.0040.00417.45
8.1.90.0040.00417.45
8.1.80.0000.00717.43
8.1.70.0030.00317.35
8.1.60.0090.00017.52
8.1.50.0000.00817.46
8.1.40.0000.00817.42
8.1.30.0030.00517.55
8.1.20.0030.00617.46
8.1.10.0020.00517.43
8.1.00.0030.00617.38
8.0.300.0040.00418.77
8.0.290.0030.00516.75
8.0.280.0000.00718.36
8.0.270.0040.00417.13
8.0.260.0040.00417.06
8.0.250.0000.00716.82
8.0.240.0060.00016.90
8.0.230.0030.00316.83
8.0.220.0020.00516.84
8.0.210.0000.00716.77
8.0.200.0030.00316.92
8.0.190.0050.00316.89
8.0.180.0040.00416.74
8.0.170.0000.00816.88
8.0.160.0050.00216.73
8.0.150.0030.00516.77
8.0.140.0050.00216.68
8.0.130.0030.00513.18
8.0.120.0040.00416.66
8.0.110.0000.00816.84
8.0.100.0000.00816.82
8.0.90.0030.00316.63
8.0.80.0060.00916.81
8.0.70.0070.00016.82
8.0.60.0000.00816.84
8.0.50.0040.00416.70
8.0.30.0110.00817.06
8.0.20.0140.00817.40
8.0.10.0040.00416.79
8.0.00.0160.00516.63
7.4.330.0000.00515.03
7.4.320.0060.00016.50
7.4.300.0060.00016.37
7.4.290.0000.00816.46
7.4.280.0070.00016.52
7.4.270.0000.00716.56
7.4.260.0070.00316.35
7.4.250.0040.00416.52
7.4.240.0030.00416.45
7.4.230.0090.00016.34
7.4.220.0100.01016.46
7.4.210.0140.00016.48
7.4.200.0040.00316.43
7.4.160.0120.00416.53
7.4.150.0130.01017.40
7.4.140.0120.01017.86
7.4.130.0090.00816.31
7.4.120.0090.00716.25
7.4.110.0030.01316.28
7.4.100.0080.00916.32
7.4.90.0070.01016.48
7.4.80.0100.00719.39
7.4.70.0110.00816.32
7.4.60.0170.00316.27
7.4.50.0000.00816.37
7.4.40.0030.01416.58
7.4.30.0130.00616.36
7.4.00.0110.00715.01
7.3.330.0050.00012.87
7.3.320.0000.00613.12
7.3.310.0030.00315.98
7.3.300.0040.00315.99
7.3.290.0100.00316.08
7.3.280.0090.00716.13
7.3.270.0130.01317.40
7.3.260.0080.00816.13
7.3.250.0100.01316.16
7.3.240.0080.01216.39
7.3.230.0130.00616.39
7.3.210.0130.01916.17
7.3.200.0130.00319.39
7.3.190.0060.01616.34
7.3.180.0130.00316.37
7.3.170.0120.00416.40
7.3.160.0110.00716.18
7.3.10.0070.00816.41
7.3.00.0030.01016.34
7.2.330.0080.00916.54
7.2.320.0080.01216.40
7.2.310.0090.01316.29
7.2.300.0130.00216.28
7.2.290.0090.00616.51
7.2.130.0070.00816.72
7.2.120.0030.00916.61
7.2.110.0070.00616.63
7.2.100.0050.01216.63
7.2.90.0040.00716.80
7.2.80.0020.01016.77
7.2.70.0020.01216.71
7.2.60.0060.00816.69
7.2.50.0020.01216.59
7.2.40.0010.01316.84
7.2.30.0030.00716.87
7.2.20.0050.01216.82
7.2.10.0060.00616.56
7.2.00.0090.00817.62
7.1.250.0070.00515.74
7.1.240.0100.00315.66
7.1.230.0070.00715.77
7.1.220.0050.00515.77
7.1.210.0060.00915.75
7.1.200.0070.00615.64
7.1.190.0030.01015.73
7.1.180.0080.00815.77
7.1.170.0120.00315.56
7.1.160.0060.00615.81
7.1.150.0040.00815.63
7.1.140.0080.00415.70
7.1.130.0070.01015.80
7.1.120.0000.01115.54
7.1.110.0030.00915.84
7.1.100.0140.00716.31
7.1.90.0060.00615.57
7.1.80.0070.00715.59
7.1.70.0040.00616.33
7.1.60.0020.01517.48
7.1.50.0040.01116.39
7.1.40.0030.00915.66
7.1.30.0000.01015.71
7.1.20.0070.00715.60
7.1.10.0060.01015.84
7.1.00.0050.04118.94
7.0.330.0040.00815.26
7.0.320.0080.00615.17
7.0.310.0100.00615.31
7.0.300.0040.01115.38
7.0.290.0040.00815.41
7.0.280.0090.00615.37
7.0.270.0000.01615.29
7.0.260.0040.01115.28
7.0.250.0080.00315.26
7.0.240.0100.00315.04
7.0.230.0030.01015.12
7.0.220.0050.00315.15
7.0.210.0100.00315.35
7.0.200.0030.00616.09
7.0.190.0030.01015.19
7.0.180.0000.01314.99
7.0.170.0000.01415.35
7.0.160.0000.01015.32
7.0.150.0030.00615.09
7.0.140.0070.03718.57
7.0.130.0040.01115.47
7.0.120.0030.01015.53
7.0.110.0000.01415.55
7.0.100.0030.00915.23
7.0.90.0070.00714.96
7.0.80.0000.01615.43
7.0.70.0000.01015.41
7.0.60.0030.04817.58
7.0.50.0040.02516.60
7.0.40.0070.04116.84
7.0.30.0200.03716.81
7.0.20.0060.02816.77
7.0.10.0050.03016.86
7.0.00.0090.03816.75
5.6.380.0040.00413.98
5.6.370.0070.01014.20
5.6.360.0060.00614.07
5.6.350.0090.00313.96
5.6.340.0110.00414.21
5.6.330.0120.00314.20
5.6.320.0030.00914.30
5.6.310.0000.01514.07
5.6.300.0060.00614.37
5.6.290.0000.01214.25
5.6.280.0030.04017.44
5.6.270.0090.00614.31
5.6.260.0060.00314.04
5.6.250.0040.01114.29
5.6.240.0120.00313.90
5.6.230.0000.01114.32
5.6.220.0090.00314.15
5.6.210.0120.04017.28
5.6.200.0080.04216.03
5.6.190.0080.04717.38
5.6.180.0080.03217.34
5.6.170.0280.02917.46
5.6.160.0100.04317.24
5.6.150.0070.03116.18
5.6.140.0030.02316.09
5.6.130.0060.03615.99
5.6.120.0090.03317.53
5.6.110.0060.03017.68
5.6.100.0100.04517.61
5.6.90.0050.02417.53
5.6.80.0050.02517.36
5.6.70.0070.00714.19
5.6.60.0000.01114.05
5.6.50.0040.01214.24
5.6.40.0030.01014.01
5.6.30.0120.00014.28
5.6.20.0090.00614.25
5.6.10.0090.00614.01
5.6.00.0000.01613.95
5.5.380.0040.00810.93
5.5.370.0030.00911.09
5.5.360.0030.00910.87
5.5.350.0040.04415.55
5.5.340.0080.03314.45
5.5.330.0030.02815.51
5.5.320.0070.04615.34
5.5.310.0200.03715.55
5.5.300.0030.04714.49
5.5.290.0090.04014.42
5.5.280.0030.02715.88
5.5.270.0020.05315.97
5.5.260.0080.02315.71
5.5.250.0050.02815.74
5.5.240.0180.04115.55
5.5.230.0030.00710.80
5.5.220.0060.00310.63
5.5.210.0070.00710.71
5.5.200.0080.00411.03
5.5.190.0060.00610.75
5.5.180.0060.00310.88
5.5.170.0030.00710.77
5.5.160.0030.00710.91
5.5.150.0030.00310.97
5.5.140.0040.00710.81
5.5.130.0030.00310.39
5.5.120.0040.00410.85
5.5.110.0070.00010.80
5.5.100.0030.00610.86
5.5.90.0030.00310.87
5.5.80.0030.01011.02
5.5.70.0060.00610.78
5.5.60.0030.00511.01
5.5.50.0050.00010.73
5.5.40.0060.00611.03
5.5.30.0060.00310.72
5.5.20.0060.00610.99
5.5.10.0090.00311.05
5.5.00.0000.00810.88
5.4.450.0310.03015.36
5.4.440.0180.02515.23
5.4.430.0100.02515.21
5.4.420.0050.03015.13
5.4.410.0110.02615.09
5.4.400.0020.03514.94
5.4.390.0050.03014.87
5.4.380.0030.03414.62
5.4.370.0000.03214.52
5.4.360.0070.02014.72
5.4.350.0070.01911.47
5.4.340.0100.02011.41
5.4.330.0100.00010.73
5.4.320.0040.02311.75
5.4.310.0050.02411.78
5.4.300.0040.02111.71
5.4.290.0050.02211.69
5.4.280.0050.02011.73
5.4.270.0040.02311.55
5.4.260.0050.02411.55
5.4.250.0060.02011.50
5.4.240.0030.02211.52
5.4.230.0020.02611.51
5.4.220.0040.02311.68
5.4.210.0060.02111.60
5.4.200.0030.03111.59
5.4.190.0050.02511.69
5.4.180.0020.02211.61
5.4.170.0080.01611.59
5.4.160.0030.02811.47
5.4.150.0040.02411.57
5.4.140.0080.02211.40
5.4.130.0040.02111.45
5.4.120.0030.02511.47
5.4.110.0060.02211.46
5.4.100.0070.01911.38
5.4.90.0040.02311.19
5.4.80.0020.02411.38
5.4.70.0050.02211.43
5.4.60.0080.02011.28
5.4.50.0040.02411.33
5.4.40.0060.01811.34
5.4.30.0040.02211.46
5.4.20.0060.02111.40
5.4.10.0030.02111.41
5.4.00.0050.02011.23
5.3.290.0060.02211.59
5.3.280.0050.02211.50
5.3.270.0060.02111.52
5.3.260.0060.02311.62
5.3.250.0040.02411.60
5.3.240.0060.02011.53
5.3.230.0050.02311.58
5.3.220.0080.02211.39
5.3.210.0060.02111.51
5.3.200.0040.02111.56
5.3.190.0030.02411.59
5.3.180.0040.02611.58
5.3.170.0040.02511.52
5.3.160.0040.02211.60
5.3.150.0060.02111.58
5.3.140.0060.02311.49
5.3.130.0050.02211.51
5.3.120.0050.02411.55
5.3.110.0060.02211.52
5.3.100.0040.02311.30
5.3.90.0040.02611.25
5.3.80.0040.02311.19
5.3.70.0050.02111.15
5.3.60.0050.02111.31
5.3.50.0050.02111.15
5.3.40.0070.02011.08
5.3.30.0060.02111.08
5.3.20.0060.02110.96
5.3.10.0060.01910.99
5.3.00.0040.02210.97
5.2.170.0040.0189.57
5.2.160.0030.0189.57
5.2.150.0060.0169.57
5.2.140.0040.0199.57
5.2.130.0040.0169.54
5.2.120.0030.0189.55
5.2.110.0080.0149.55
5.2.100.0020.0189.55
5.2.90.0020.0219.55
5.2.80.0030.0189.55
5.2.70.0020.0229.55
5.2.60.0030.0209.52
5.2.50.0040.0189.51
5.2.40.0060.0179.50
5.2.30.0020.0199.48
5.2.20.0020.0169.48
5.2.10.0040.0179.44
5.2.00.0040.0179.37
5.1.60.0030.0139.01
5.1.50.0020.0179.01
5.1.40.0070.0139.00
5.1.30.0010.0199.18
5.1.20.0060.0149.19
5.1.10.0050.0149.05
5.1.00.0010.0179.05
5.0.50.0020.0148.29
5.0.40.0040.0118.22
5.0.30.0030.0198.13
5.0.20.0040.0138.11
5.0.10.0010.0148.10
5.0.00.0020.0208.09
4.4.90.0020.0097.37
4.4.80.0040.0077.36
4.4.70.0040.0107.36
4.4.60.0020.0117.36
4.4.50.0040.0097.37
4.4.40.0030.0167.34
4.4.30.0020.0117.36
4.4.20.0020.0117.40
4.4.10.0020.0127.40
4.4.00.0050.0127.36
4.3.110.0050.0077.31
4.3.100.0040.0097.31
4.3.90.0020.0107.30
4.3.80.0040.0137.27
4.3.70.0040.0117.29
4.3.60.0010.0117.29
4.3.50.0020.0117.29
4.3.40.0030.0137.25
4.3.30.0010.0146.62
4.3.20.0010.0126.61
4.3.10.0010.0116.59
4.3.00.0080.0128.56

preferences:
36.23 ms | 401 KiB | 5 Q