3v4l.org

run code in 500+ PHP versions simultaneously
<?php $needle = 42; $identical = $needle; $equal = (string) $needle; $different = $needle + 1; foreach ([ [$different], [$identical], [$different, $identical], [$equal], [$different, $equal], ] as $haystack) { var_dump(array_search($needle, $haystack)); var_dump(array_search($needle, $haystack) !== false); var_dump(in_array($needle, $haystack)); echo "\n"; var_dump(array_search($needle, $haystack, true)); var_dump(array_search($needle, $haystack, true) !== false); var_dump(in_array($needle, $haystack, true)); echo "\n"; echo "\n"; }

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.5.30.0090.01017.64
8.5.20.0100.00920.30
8.5.10.0090.00916.64
8.5.00.0140.00820.02
8.4.180.0120.00823.79
8.4.170.0150.00823.78
8.4.160.0150.00623.95
8.4.150.0080.00516.85
8.4.140.0140.00717.94
8.4.130.0060.00417.62
8.4.120.0120.00720.39
8.4.110.0140.00718.53
8.4.100.0150.00517.59
8.4.90.0090.00817.59
8.4.80.0060.00317.60
8.4.70.0160.00619.66
8.4.60.0070.00219.65
8.4.50.0130.00718.86
8.4.40.0130.00617.50
8.4.30.0060.01320.57
8.4.20.0070.01417.63
8.4.10.0060.00322.49
8.3.300.0100.01022.66
8.3.290.0130.00818.24
8.3.280.0130.00718.45
8.3.270.0130.00916.47
8.3.260.0120.00816.45
8.3.250.0100.00918.63
8.3.240.0120.00716.74
8.3.230.0130.00616.52
8.3.220.0050.00316.98
8.3.210.0110.00816.63
8.3.200.0120.00816.79
8.3.190.0080.01220.76
8.3.180.0090.00816.73
8.3.170.0060.00317.09
8.3.160.0100.01016.57
8.3.150.0060.01319.06
8.3.140.0150.00020.58
8.3.130.0130.00618.44
8.3.120.0050.00520.71
8.3.110.0060.00320.94
8.3.100.0000.00824.06
8.3.90.0040.01426.77
8.3.80.0060.00319.36
8.3.70.0120.00618.30
8.3.60.0180.00016.75
8.3.50.0100.00924.53
8.3.40.0070.00718.90
8.3.30.0000.01918.59
8.3.20.0080.00024.18
8.3.10.0090.00024.66
8.3.00.0030.00626.16
8.2.300.0130.00717.80
8.2.290.0080.01020.70
8.2.280.0090.01018.27
8.2.270.0160.00317.27
8.2.260.0070.01318.78
8.2.250.0130.00318.36
8.2.240.0000.00817.29
8.2.230.0040.00422.58
8.2.220.0100.00637.54
8.2.210.0090.00926.77
8.2.200.0030.00618.88
8.2.190.0120.00316.75
8.2.180.0110.00425.92
8.2.170.0140.00022.96
8.2.160.0120.00322.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00026.35
8.2.110.0000.01019.31
8.2.100.0070.00417.91
8.2.90.0000.00820.01
8.2.80.0030.00518.16
8.2.70.0050.00317.63
8.2.60.0080.00017.63
8.2.50.0040.00817.50
8.2.40.0000.00718.16
8.2.30.0040.00418.01
8.2.20.0040.00418.06
8.2.10.0000.00719.27
8.2.00.0000.00719.30
8.1.340.0120.00817.78
8.1.330.0090.01116.74
8.1.320.0120.00716.01
8.1.310.0060.00916.61
8.1.300.0000.00815.96
8.1.290.0040.00430.84
8.1.280.0110.00425.92
8.1.270.0050.00323.99
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0040.00720.64
8.1.230.0080.00320.95
8.1.220.0000.00817.79
8.1.210.0030.00618.77
8.1.200.0000.00817.35
8.1.190.0030.00617.23
8.1.180.0000.00818.10
8.1.170.0030.00618.62
8.1.160.0040.00418.91
8.1.150.0050.00318.90
8.1.140.0000.00719.02
8.1.130.0000.00720.14
8.1.120.0000.00717.38
8.1.110.0080.00017.45
8.1.100.0070.00017.34
8.1.90.0040.00417.43
8.1.80.0080.00017.48
8.1.70.0000.00717.47
8.1.60.0060.00617.59
8.1.50.0050.00317.56
8.1.40.0050.00317.42
8.1.30.0040.00417.64
8.1.20.0030.00617.57
8.1.10.0000.00817.48
8.1.00.0030.00617.34
8.0.300.0050.00320.03
8.0.290.0030.00616.75
8.0.280.0040.00418.36
8.0.270.0050.00317.93
8.0.260.0030.00320.11
8.0.250.0000.00716.97
8.0.240.0000.00716.84
8.0.230.0000.00716.97
8.0.220.0030.00316.91
8.0.210.0000.00816.91
8.0.200.0040.00416.95
8.0.190.0060.00316.96
8.0.180.0050.00316.89
8.0.170.0050.00316.93
8.0.160.0000.00716.93
8.0.150.0030.00316.76
8.0.140.0040.00416.91
8.0.130.0030.00313.30
8.0.120.0000.00816.75
8.0.110.0030.00516.86
8.0.100.0000.00816.78
8.0.90.0000.00916.96
8.0.80.0130.00516.84
8.0.70.0040.00416.77
8.0.60.0000.00816.70
8.0.50.0040.00416.69
8.0.30.0080.01117.34
8.0.20.0060.01216.86
8.0.10.0070.00017.04
8.0.00.0160.01016.83
7.4.330.0030.00215.55
7.4.320.0030.00316.61
7.4.300.0030.00316.40
7.4.290.0070.00016.51
7.4.280.0040.00416.40
7.4.270.0060.00016.56
7.4.260.0050.00013.23
7.4.250.0070.00016.48
7.4.240.0030.00416.56
7.4.230.0040.00416.50
7.4.220.0030.00316.58
7.4.210.0060.01016.55
7.4.200.0040.00416.62
7.4.130.0060.01116.42
7.4.120.0130.00916.46
7.4.110.0130.00316.57
7.4.100.0070.01016.57
7.4.90.0030.01316.56
7.4.80.0040.01419.39
7.4.70.0130.00316.47
7.4.60.0180.00616.25
7.4.50.0130.00916.36
7.4.40.0090.01216.33
7.4.30.0140.00316.54
7.4.20.0100.00716.16
7.4.10.0070.01016.35
7.4.00.0080.00816.43
7.3.330.0040.00416.35
7.3.320.0030.00313.23
7.3.310.0030.00316.29
7.3.300.0070.00016.34
7.3.290.0060.01016.35
7.3.260.0060.01316.58
7.3.240.0110.00716.47
7.3.230.0130.00516.54
7.3.210.0120.00616.54
7.3.200.0120.00416.36
7.3.190.0100.00716.57
7.3.180.0090.01216.28
7.3.170.0150.00616.30
7.3.160.0030.01316.49
7.3.150.0000.01616.22
7.3.140.0060.00916.45
7.3.130.0120.00416.35
7.3.120.0090.00616.61
7.3.110.0080.00816.45
7.3.100.0080.00816.46
7.3.90.0090.00916.26
7.3.80.0100.01016.64
7.3.70.0130.00516.30
7.3.60.0090.01516.34
7.3.50.0110.00716.46
7.3.40.0150.00316.26
7.3.30.0090.00916.46
7.3.20.0110.00616.36
7.3.10.0160.00916.40
7.3.00.0340.01416.39
7.2.330.0120.00916.77
7.2.320.0030.01616.92
7.2.310.0060.01616.50
7.2.300.0150.00616.82
7.2.290.0100.00716.25
7.2.280.0050.01116.73
7.2.270.0120.00816.51
7.2.260.0120.00416.64
7.2.250.0090.00916.50
7.2.240.0140.00516.67
7.2.230.0070.01016.62
7.2.220.0000.02016.71
7.2.210.0070.01416.50
7.2.200.0120.00916.31
7.2.190.0030.01416.59
7.2.180.0100.01016.58
7.2.170.0150.00716.50
7.2.160.0120.00616.77
7.2.150.0110.00716.66
7.2.140.0070.01416.44
7.2.130.0110.01516.62
7.2.120.0030.02116.65
7.2.110.0150.00316.59
7.2.100.0070.01416.58
7.2.90.0080.01216.54
7.2.80.0120.00616.36
7.2.70.0040.01516.61
7.2.60.0080.00816.67
7.2.50.0040.01416.54
7.2.40.0080.00816.68
7.2.30.0090.00916.73
7.2.20.0070.01416.52
7.2.10.0100.00716.44
7.2.00.0110.01116.25

preferences:
46.76 ms | 1553 KiB | 5 Q