3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array("hello", "world", "foobar"); $value1 = "foobar"; $value2 = "test"; if(!in_array($value1, $array)) $array[] = $value1; // this will not be added because foobar already exists in the array if(!in_array($value2, $array)) $array[] = $value2; // this will be added because it does not exist in the array print_r($array); ?>

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.0090.01216.38
8.3.50.0090.01421.15
8.3.40.0030.01018.84
8.3.30.0100.00319.17
8.3.20.0040.00420.12
8.3.10.0050.00323.70
8.3.00.0030.00519.25
8.2.180.0030.01216.63
8.2.170.0070.00722.96
8.2.160.0070.00719.16
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0030.00626.16
8.2.120.0040.00422.14
8.2.110.0040.01222.13
8.2.100.0090.00317.91
8.2.90.0000.00817.97
8.2.80.0040.00419.28
8.2.70.0060.00317.93
8.2.60.0030.00618.01
8.2.50.0060.00318.10
8.2.40.0040.00419.39
8.2.30.0000.00718.24
8.2.20.0040.00417.81
8.2.10.0040.00418.20
8.2.00.0070.00017.59
8.1.280.0070.01125.92
8.1.270.0080.00022.13
8.1.260.0050.00226.35
8.1.250.0080.00028.09
8.1.240.0090.00019.26
8.1.230.0040.00822.76
8.1.220.0040.00417.79
8.1.210.0030.00518.77
8.1.200.0050.00517.23
8.1.190.0060.00317.22
8.1.180.0000.00818.10
8.1.170.0000.00818.65
8.1.160.0000.00718.89
8.1.150.0000.00718.77
8.1.140.0040.00417.50
8.1.130.0000.00717.75
8.1.120.0000.00717.51
8.1.110.0040.00417.37
8.1.100.0070.00017.45
8.1.90.0030.00417.54
8.1.80.0040.00417.34
8.1.70.0030.00517.34
8.1.60.0000.00917.52
8.1.50.0030.00617.55
8.1.40.0080.00017.43
8.1.30.0040.00417.68
8.1.20.0000.00717.50
8.1.10.0040.00417.41
8.1.00.0030.00517.46
8.0.300.0060.00320.07
8.0.290.0000.00816.75
8.0.280.0000.00718.39
8.0.270.0030.00516.79
8.0.260.0000.00717.16
8.0.250.0030.00316.95
8.0.240.0050.00216.94
8.0.230.0040.00316.99
8.0.220.0000.01016.92
8.0.210.0000.00616.79
8.0.200.0070.00016.88
8.0.190.0030.00616.96
8.0.180.0000.00816.95
8.0.170.0040.00416.94
8.0.160.0030.00316.89
8.0.150.0070.00016.91
8.0.140.0070.00016.87
8.0.130.0030.00313.34
8.0.120.0060.00316.81
8.0.110.0050.00316.73
8.0.100.0000.00716.69
8.0.90.0000.00716.80
8.0.80.0120.00316.86
8.0.70.0000.00716.76
8.0.60.0030.00516.87
8.0.50.0000.00716.73
8.0.30.0100.01317.14
8.0.20.0080.01117.40
8.0.10.0000.00717.07
8.0.00.0130.00516.83
7.4.330.0000.00515.00
7.4.320.0000.00616.50
7.4.300.0030.00316.59
7.4.290.0070.00016.54
7.4.280.0040.00716.64
7.4.270.0050.00216.56
7.4.260.0000.00716.56
7.4.250.0020.00516.43
7.4.240.0000.00716.47
7.4.230.0070.00016.32
7.4.220.0090.00916.37
7.4.210.0090.00916.37
7.4.200.0050.00316.59
7.4.160.0060.01016.43
7.4.150.0140.00617.40
7.4.140.0140.00317.86
7.4.130.0090.00816.43
7.4.120.0100.00616.53
7.4.110.0080.00816.45
7.4.100.0100.00716.51
7.4.90.0090.00716.37
7.4.80.0090.00919.39
7.4.70.0130.00316.34
7.4.60.0070.01116.60
7.4.50.0020.00216.48
7.4.40.0100.00616.67
7.4.30.0120.00916.32
7.4.00.0030.01014.86
7.3.330.0060.00013.07
7.3.320.0030.00312.96
7.3.310.0000.00816.20
7.3.300.0030.00316.23
7.3.290.0060.00816.23
7.3.280.0080.01016.23
7.3.270.0090.00917.40
7.3.260.0090.00816.27
7.3.250.0040.01316.24
7.3.240.0120.00616.31
7.3.230.0000.01716.39
7.3.210.0120.00416.25
7.3.200.0030.01319.39
7.3.190.0090.01216.62
7.3.180.0060.00916.19
7.3.170.0100.00716.54
7.3.160.0040.01116.21
7.3.00.0040.00816.23
7.2.330.0060.01016.38
7.2.320.0030.02016.58
7.2.310.0110.00516.40
7.2.300.0080.00816.51
7.2.290.0060.01216.46
7.2.130.0030.01117.05
7.2.120.0030.00916.79
7.2.110.0090.00616.83
7.2.100.0060.00616.67
7.2.90.0040.01117.04
7.2.80.0060.01016.99
7.2.70.0060.00316.91
7.2.60.0070.00516.84
7.2.50.0060.00516.69
7.2.40.0000.01116.99
7.2.30.0070.00716.89
7.2.20.0000.01216.76
7.2.10.0100.00316.74
7.2.00.0070.00418.11
7.1.250.0040.00715.77
7.1.240.0040.00415.73
7.1.230.0100.00315.65
7.1.220.0060.00615.79
7.1.210.0030.01015.81
7.1.200.0030.00815.83
7.1.190.0060.00615.67
7.1.180.0120.00015.61
7.1.170.0040.01115.79
7.1.160.0130.00315.62
7.1.150.0000.01215.75
7.1.140.0080.00315.79
7.1.130.0120.00015.63
7.1.120.0000.01015.70
7.1.110.0080.00015.97
7.1.100.0080.00616.94
7.1.90.0000.01215.94
7.1.80.0090.00615.95
7.1.70.0070.00316.40
7.1.60.0070.00616.31
7.1.50.0080.01016.38
7.1.40.0040.01115.88
7.1.30.0040.00815.87
7.1.20.0100.00615.86
7.1.10.0140.00015.46
7.1.00.0050.04019.02
7.0.330.0100.00715.42
7.0.320.0000.01015.13
7.0.310.0090.00015.38
7.0.300.0040.00415.37
7.0.290.0100.00315.52
7.0.280.0080.00315.36
7.0.270.0000.00915.36
7.0.260.0100.00015.31
7.0.250.0000.01115.25
7.0.240.0070.00415.39
7.0.230.0070.00715.52
7.0.220.0050.00515.40
7.0.210.0060.00915.23
7.0.200.0030.00916.16
7.0.190.0130.00315.40
7.0.180.0000.00815.17
7.0.170.0030.00615.42
7.0.160.0030.00915.37
7.0.150.0000.00815.37
7.0.140.0030.04318.73
7.0.130.0070.00415.00
7.0.120.0000.01215.51
7.0.110.0440.02617.68
7.0.100.0170.03317.60
7.0.90.0200.02917.79
7.0.80.0420.02217.71
7.0.70.0120.03117.63
7.0.60.0350.04617.69
7.0.50.0250.04517.63
7.0.40.0070.03816.65
7.0.30.0030.02516.57
7.0.20.0100.03816.46
7.0.10.0070.03516.53
7.0.00.0030.03516.49
5.6.380.0080.00414.34
5.6.370.0030.00914.22
5.6.360.0060.00314.32
5.6.350.0100.00314.44
5.6.340.0030.01014.22
5.6.330.0090.00314.48
5.6.320.0060.00614.68
5.6.310.0080.00814.32
5.6.300.0030.00914.30
5.6.290.0040.00814.18
5.6.280.0050.03817.72
5.6.270.0070.00714.27
5.6.260.0060.02417.38
5.6.250.0020.02917.53
5.6.240.0040.03517.41
5.6.230.0040.02617.34
5.6.220.0050.02517.53
5.6.210.0080.04217.61
5.6.200.0080.04317.42
5.6.190.0070.03717.50
5.6.180.0100.02517.46
5.6.170.0020.02417.60
5.6.160.0070.02517.29
5.6.150.0020.04717.24
5.6.140.0060.04517.59
5.6.130.0070.04417.37
5.6.120.0050.04417.40
5.6.110.0040.04617.35
5.6.100.0030.04617.50
5.6.90.0070.04117.38
5.6.80.0060.04317.11
5.6.70.0020.02817.03
5.6.60.0030.04617.12
5.6.50.0000.03417.17
5.6.40.0110.03117.14
5.6.30.0080.04317.15
5.6.20.0100.03817.08
5.6.10.0090.03817.18
5.6.00.0030.02917.20
5.5.380.0080.03015.82
5.5.370.0090.04115.68
5.5.360.0080.03515.73
5.5.350.0040.03315.74
5.5.340.0040.03516.01
5.5.330.0050.04516.14
5.5.320.0030.04516.09
5.5.310.0040.02116.07
5.5.300.0080.03816.09
5.5.290.0060.04415.81
5.5.280.0080.04316.03
5.5.270.0070.03816.01
5.5.260.0080.03115.89
5.5.250.0080.04015.91
5.5.240.0070.04015.81
5.5.230.0070.02615.59
5.5.220.0070.04215.52
5.5.210.0060.02515.50
5.5.200.0080.03915.51
5.5.190.0100.03515.64
5.5.180.0100.03815.68
5.5.170.0040.00711.28
5.5.160.0070.03915.58
5.5.150.0050.04315.56
5.5.140.0070.04315.58
5.5.130.0060.04215.63
5.5.120.0030.04015.65
5.5.110.0070.04215.46
5.5.100.0050.02715.70
5.5.90.0060.03815.61
5.5.80.0050.02915.64
5.5.70.0100.03515.69
5.5.60.0070.04015.69
5.5.50.0070.04015.44
5.5.40.0050.04115.43
5.5.30.0070.03215.71
5.5.20.0050.04115.53
5.5.10.0050.04615.58
5.5.00.0020.02915.66
5.4.450.0050.04415.29
5.4.440.0110.01715.15
5.4.430.0000.04215.27
5.4.420.0050.04215.30
5.4.410.0060.04015.16
5.4.400.0020.04615.13
5.4.390.0040.04115.06
5.4.380.0070.03915.03
5.4.370.0060.02315.08
5.4.360.0030.04215.03
5.4.350.0060.03814.99
5.4.340.0000.03015.02
5.4.330.0070.00710.93
5.4.320.0050.04115.05
5.4.310.0030.03315.02
5.4.300.0060.04014.95
5.4.290.0120.03515.11
5.4.280.0050.04515.13
5.4.270.0080.04015.14
5.4.260.0050.04114.96
5.4.250.0110.03414.95
5.4.240.0070.04114.95
5.4.230.0070.03815.10
5.4.220.0070.04014.95
5.4.210.0070.02315.12
5.4.200.0020.04815.04
5.4.190.0040.04315.02
5.4.180.0050.03115.11
5.4.170.0030.04014.96
5.4.160.0020.04214.93
5.4.150.0060.03115.11
5.4.140.0130.03313.78
5.4.130.0060.04113.73
5.4.120.0100.03813.86
5.4.110.0080.03813.81
5.4.100.0080.03513.87
5.4.90.0050.04013.76
5.4.80.0020.04113.60
5.4.70.0040.03613.79
5.4.60.0020.04313.82
5.4.50.0080.03713.72
5.4.40.0050.02813.82
5.4.30.0050.01913.76
5.4.20.0030.04013.83
5.4.10.0070.03513.81
5.4.00.0030.03613.38
5.3.290.0040.04212.84
5.3.280.0080.03212.74
5.3.270.0050.03312.73
5.3.260.0020.02512.86
5.3.250.0090.03712.76
5.3.240.0050.04012.76
5.3.230.0100.03312.72
5.3.220.0020.02412.75
5.3.210.0060.04012.77
5.3.200.0080.03612.80
5.3.190.0070.04212.72
5.3.180.0160.02012.84
5.3.170.0060.03712.65
5.3.160.0020.04012.77
5.3.150.0050.04312.84
5.3.140.0040.04012.73
5.3.130.0070.02612.74
5.3.120.0040.02712.70
5.3.110.0040.02512.72
5.3.100.0020.04112.53
5.3.90.0100.01712.50
5.3.80.0080.03712.44
5.3.70.0070.03712.49
5.3.60.0070.03312.56
5.3.50.0080.02512.42
5.3.40.0030.04312.42
5.3.30.0070.02112.33
5.3.20.0050.04012.29
5.3.10.0070.03812.31
5.3.00.0090.03512.34
5.2.170.0040.03511.70
5.2.160.0060.02611.70
5.2.150.0040.03211.70
5.2.140.0040.02911.70
5.2.130.0070.03011.70
5.2.120.0060.02811.70
5.2.110.0040.03311.70
5.2.100.0050.03211.70
5.2.90.0070.02711.70
5.2.80.0100.02711.70
5.2.70.0020.02111.70
5.2.60.0040.01611.70
5.2.50.0030.03411.70
5.2.40.0020.02411.70
5.2.30.0040.01711.70
5.2.20.0050.03011.70
5.2.10.0070.02811.70
5.2.00.0080.02811.70
5.1.60.0050.02511.70
5.1.50.0050.02311.70
5.1.40.0100.02211.70
5.1.30.0040.03011.70
5.1.20.0050.02911.70
5.1.10.0040.02011.70
5.1.00.0060.01011.70
5.0.50.0030.01111.70
5.0.40.0030.01011.70
5.0.30.0050.02211.70
5.0.20.0000.01411.70
5.0.10.0050.01011.70
5.0.00.0010.02311.70
4.4.90.0060.01511.70
4.4.80.0020.01111.70
4.4.70.0050.00811.70
4.4.60.0040.01911.70
4.4.50.0020.02011.70
4.4.40.0030.01511.70
4.4.30.0030.01111.70
4.4.20.0000.01011.70
4.4.10.0000.01111.70
4.4.00.0050.01811.70
4.3.110.0000.02011.70
4.3.100.0020.01711.70
4.3.90.0030.00911.70
4.3.80.0000.01411.70
4.3.70.0020.00911.70
4.3.60.0000.01011.70
4.3.50.0020.01011.70
4.3.40.0000.01511.70
4.3.30.0000.01511.70
4.3.20.0020.01311.70
4.3.10.0030.00811.70
4.3.00.0030.00811.70

preferences:
44.84 ms | 401 KiB | 5 Q