3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test_func($value) { return array_search($value, array(0, 1, true, false, "1", "0", "true", "false"), true) == true; } var_dump(test_func("1")); var_dump(test_func("false")); var_dump(test_func("1sdf qsdf"));

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.0030.01718.43
8.3.50.0130.00622.10
8.3.40.0070.00718.67
8.3.30.0070.00719.14
8.3.20.0040.00420.16
8.3.10.0000.00821.79
8.3.00.0080.00022.44
8.2.180.0110.01116.38
8.2.170.0060.00922.96
8.2.160.0110.00422.17
8.2.150.0000.00924.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0000.00817.63
8.2.110.0030.00622.21
8.2.100.0080.00419.32
8.2.90.0000.00819.27
8.2.80.0050.00319.51
8.2.70.0040.00417.50
8.2.60.0030.00617.80
8.2.50.0000.00818.07
8.2.40.0070.00417.80
8.2.30.0040.00417.92
8.2.20.0040.00417.54
8.2.10.0000.00719.45
8.2.00.0040.00417.61
8.1.280.0030.01225.92
8.1.270.0040.00421.95
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00323.72
8.1.230.0080.00319.15
8.1.220.0000.00717.74
8.1.210.0000.00818.77
8.1.200.0040.00417.11
8.1.190.0030.00617.40
8.1.180.0000.00818.10
8.1.170.0060.00318.50
8.1.160.0000.00721.93
8.1.150.0000.00718.58
8.1.140.0050.00217.32
8.1.130.0000.00717.77
8.1.120.0030.00317.32
8.1.110.0030.00517.42
8.1.100.0000.00717.27
8.1.90.0040.00317.37
8.1.80.0040.00417.38
8.1.70.0000.00817.37
8.1.60.0040.00417.53
8.1.50.0050.00317.38
8.1.40.0030.00617.46
8.1.30.0050.00317.59
8.1.20.0000.00817.68
8.1.10.0000.00817.38
8.1.00.0040.00417.34
8.0.300.0050.00318.77
8.0.290.0040.00417.05
8.0.280.0030.00318.32
8.0.270.0040.00417.30
8.0.260.0000.00716.76
8.0.250.0070.00016.95
8.0.240.0040.00416.85
8.0.230.0030.00316.89
8.0.220.0040.00416.86
8.0.210.0000.00616.88
8.0.200.0000.00616.95
8.0.190.0040.00416.77
8.0.180.0000.00716.78
8.0.170.0040.00416.86
8.0.160.0030.00516.71
8.0.150.0040.00416.71
8.0.140.0030.00516.70
8.0.130.0000.00613.23
8.0.120.0020.00516.80
8.0.110.0070.00016.67
8.0.100.0040.00416.79
8.0.90.0040.00416.90
8.0.80.0120.00316.80
8.0.70.0000.00716.71
8.0.60.0040.00416.64
8.0.50.0000.00716.68
8.0.30.0110.01116.85
8.0.20.0130.00617.40
8.0.10.0040.00416.79
8.0.00.0100.00816.84
7.4.330.0030.00315.00
7.4.320.0070.00016.44
7.4.300.0070.00016.39
7.4.290.0070.00016.44
7.4.280.0080.00016.54
7.4.270.0030.00316.47
7.4.260.0000.00716.48
7.4.250.0000.00716.54
7.4.240.0060.00116.42
7.4.230.0070.00016.53
7.4.220.0150.01016.50
7.4.210.0100.00516.49
7.4.200.0070.00016.34
7.4.190.0000.00716.63
7.4.160.0150.00316.60
7.4.150.0060.01117.40
7.4.140.0120.00917.86
7.4.130.0200.01516.46
7.4.120.0080.01216.49
7.4.110.0030.01416.39
7.4.100.0040.01416.58
7.4.90.0140.01016.49
7.4.80.0090.01219.39
7.4.70.0030.01416.46
7.4.60.0030.01316.65
7.4.50.0000.00816.21
7.4.40.0090.00622.77
7.4.30.0060.01016.63
7.4.00.0090.00914.90
7.3.330.0000.00613.23
7.3.320.0000.00613.03
7.3.310.0050.00316.10
7.3.300.0000.00716.20
7.3.290.0110.00816.34
7.3.280.0090.00716.21
7.3.270.0150.00617.40
7.3.260.0100.00716.50
7.3.250.0100.00916.52
7.3.240.0070.01116.41
7.3.230.0080.00816.57
7.3.210.0040.01416.46
7.3.200.0100.01019.39
7.3.190.0070.01416.43
7.3.180.0140.00416.46
7.3.170.0170.00016.45
7.3.160.0130.00316.29
7.3.120.0030.01214.75
7.3.10.0090.01216.12
7.3.00.0120.00315.95
7.2.330.0100.01016.46
7.2.320.0120.01216.61
7.2.310.0110.01116.57
7.2.300.0100.00716.61
7.2.290.0100.00716.36
7.2.130.0160.00016.47
7.2.120.0090.00716.27
7.2.110.0120.00616.79
7.2.100.0150.01016.52
7.2.90.0250.00016.23
7.2.80.0150.00416.02
7.2.70.0200.00316.41
7.2.60.0130.00516.38
7.2.50.0230.00316.12
7.2.40.0350.00716.46
7.2.30.0220.00616.04
7.2.20.0100.01016.61
7.2.10.0200.00316.13
7.2.00.0090.01217.83
7.1.250.0090.00915.01
7.1.200.0000.01415.61
7.1.100.0060.00618.24
7.1.70.0040.00417.06
7.1.60.0100.01019.82
7.1.50.0000.02416.92
7.1.00.0070.07322.35
7.0.200.0070.00416.81
7.0.140.0100.06722.09
7.0.100.0170.07719.95
7.0.90.0070.08319.95
7.0.80.0030.06719.90
7.0.70.0100.07019.92
7.0.60.0170.07019.95
7.0.50.0070.07020.34
7.0.40.0070.07720.13
7.0.30.0130.08320.18
7.0.20.0000.07320.19
7.0.10.0170.07020.07
7.0.00.0030.09020.14
5.6.280.0030.07320.93
5.6.250.0000.05720.56
5.6.240.0030.07720.66
5.6.230.0070.09020.57
5.6.220.0030.05020.58
5.6.210.0070.07320.75
5.6.200.0030.08321.08
5.6.190.0070.08720.93
5.6.180.0100.08021.00
5.6.170.0070.04720.95
5.6.160.0230.07321.04
5.6.150.0070.07721.17
5.6.140.0000.05721.02
5.6.130.0130.07721.06
5.6.120.0130.05020.96
5.6.110.0130.06321.01
5.6.100.0130.06021.00
5.6.90.0100.07721.04
5.6.80.0100.08020.43
5.6.70.0130.04720.49
5.6.60.0070.08020.42
5.6.50.0100.07320.45
5.6.40.0230.05720.44
5.6.30.0100.05320.38
5.6.20.0100.06720.41
5.6.10.0100.06320.30
5.6.00.0070.04720.30
5.5.380.0200.05020.39
5.5.370.0070.08320.57
5.5.360.0000.08020.48
5.5.350.0070.08320.48
5.5.340.0070.06020.86
5.5.330.0070.07720.80
5.5.320.0030.08020.87
5.5.310.0000.07320.86
5.5.300.0100.07720.91
5.5.290.0100.07720.88
5.5.280.0200.07020.76
5.5.270.0130.07020.85
5.5.260.0070.08020.85
5.5.250.0070.04320.69
5.5.240.0030.08320.22
5.5.230.0170.07020.21
5.5.220.0130.08020.21
5.5.210.0100.07720.23
5.5.200.0170.07320.18
5.5.190.0070.07720.21
5.5.180.0100.05319.99
5.5.160.0070.09020.13
5.5.150.0130.07720.10
5.5.140.0070.05720.15
5.5.130.0170.07320.03
5.5.120.0130.04320.11
5.5.110.0000.05020.26
5.5.100.0030.06320.16
5.5.90.0130.07320.09
5.5.80.0100.08020.15
5.5.70.0030.03720.09
5.5.60.0030.08019.95
5.5.50.0030.07020.09
5.5.40.0070.04720.03
5.5.30.0070.07320.09
5.5.20.0000.07320.05
5.5.10.0130.05320.00
5.5.00.0100.05720.11
5.4.450.0230.03319.38
5.4.440.0000.05319.46
5.4.430.0170.05719.17
5.4.420.0030.07319.46
5.4.410.0170.06719.36
5.4.400.0130.07319.14
5.4.390.0130.06019.04
5.4.380.0000.06318.90
5.4.370.0070.08319.21
5.4.360.0070.07718.95
5.4.350.0030.07318.90
5.4.340.0030.08019.23
5.4.320.0100.05019.12
5.4.310.0070.04718.95
5.4.300.0070.07719.03
5.4.290.0100.07319.18
5.4.280.0070.07019.18
5.4.270.0130.06719.14
5.4.260.0130.06719.15
5.4.250.0030.04719.15
5.4.240.0100.04019.16
5.4.230.0070.07019.02
5.4.220.0000.05018.87
5.4.210.0130.06318.84
5.4.200.0030.07019.23
5.4.190.0100.04019.05
5.4.180.0100.05719.02
5.4.170.0030.07319.08
5.4.160.0030.07319.05
5.4.150.0100.06019.18
5.4.140.0130.04716.48
5.4.130.0070.04716.39
5.4.120.0030.06716.46
5.4.110.0070.04316.27
5.4.100.0030.04316.39
5.4.90.0030.07716.34
5.4.80.0070.07716.49
5.4.70.0130.05716.27
5.4.60.0070.04016.45
5.4.50.0030.05716.49
5.4.40.0100.06716.41
5.4.30.0030.08016.40
5.4.20.0030.07316.29
5.4.10.0070.07316.33
5.4.00.0070.07015.90
5.3.290.0070.06714.71
5.3.280.0000.08014.69
5.3.270.0070.08014.73
5.3.260.0100.07714.58
5.3.250.0100.04014.63
5.3.240.0070.07314.66
5.3.230.0000.07314.58
5.3.220.0070.07714.48
5.3.210.0100.06014.64
5.3.200.0170.04014.59
5.3.190.0000.04714.59
5.3.180.0100.07014.70
5.3.170.0000.08714.54
5.3.160.0100.03714.70
5.3.150.0200.03314.45
5.3.140.0000.06014.58
5.3.130.0030.05014.58
5.3.120.0100.03714.57
5.3.110.0130.07014.68
5.3.100.0070.04314.10
5.3.90.0030.06314.14
5.3.80.0100.06014.09
5.3.70.0100.07014.07
5.3.60.0130.06713.99
5.3.50.0130.06714.09
5.3.40.0070.05713.85
5.3.30.0100.06313.93
5.3.20.0070.05313.74
5.3.10.0100.06313.66
5.3.00.0100.03713.69
5.2.170.0030.04711.06
5.2.160.0100.06011.05
5.2.150.0100.05711.00
5.2.140.0070.06311.04
5.2.130.0030.05011.00
5.2.120.0100.05311.22
5.2.110.0070.06011.16
5.2.100.0130.04011.02
5.2.90.0100.06010.99
5.2.80.0070.05311.12
5.2.70.0100.02711.21
5.2.60.0000.04711.06
5.2.50.0070.06011.05
5.2.40.0000.03710.89
5.2.30.0070.06011.02
5.2.20.0030.05710.98
5.2.10.0000.03010.92
5.2.00.0000.05310.70
5.1.60.0100.05010.05
5.1.50.0030.05710.02
5.1.40.0070.04710.00
5.1.30.0000.03310.20
5.1.20.0130.03010.44
5.1.10.0100.05310.15
5.1.00.0030.04310.08
5.0.50.0000.0478.89
5.0.40.0000.0208.89
5.0.30.0070.0438.89
5.0.20.0030.0308.89
5.0.10.0070.0338.89
5.0.00.0000.0678.89
4.4.90.0000.0378.89
4.4.80.0000.0378.89
4.4.70.0000.0378.89
4.4.60.0030.0238.89
4.4.50.0070.0338.89
4.4.40.0070.0408.89
4.4.30.0030.0208.89
4.4.20.0000.0178.89
4.4.10.0030.0278.89
4.4.00.0070.0438.89
4.3.110.0030.0178.89
4.3.100.0000.0208.89
4.3.90.0070.0178.89
4.3.80.0030.0478.89
4.3.70.0000.0338.89
4.3.60.0070.0338.89
4.3.50.0030.0238.89
4.3.40.0030.0508.89
4.3.30.0000.0238.89
4.3.20.0000.0308.89
4.3.10.0030.0378.89
4.3.00.0000.0178.89

preferences:
43.34 ms | 401 KiB | 5 Q