3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = ['oooo', 'no', 'mmmm', 'yes']; $needle = 'Yes'; foreach ($array as $i => $v) { if (stripos($v, $needle) !== false) { $found = $i; break; } } echo $found ?? 'Not found';

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.4.130.0120.00719.59
8.4.120.0110.00825.85
8.4.110.0050.00322.28
8.4.100.0090.01218.78
8.4.90.0030.00520.65
8.4.80.0110.00720.33
8.4.70.0160.00520.78
8.4.60.0130.00718.54
8.4.50.0140.00618.68
8.4.40.0130.00717.75
8.4.30.0120.00618.73
8.4.20.0130.00618.58
8.4.10.0040.00419.06
8.3.260.0090.00916.38
8.3.250.0100.00918.90
8.3.240.0130.00617.06
8.3.230.0090.01016.27
8.3.220.0070.00118.88
8.3.210.0040.00416.81
8.3.200.0020.00716.41
8.3.190.0100.00517.07
8.3.180.0030.00517.29
8.3.170.0090.00920.72
8.3.160.0090.00916.91
8.3.150.0150.00417.26
8.3.140.0070.00018.21
8.3.130.0030.00716.66
8.3.120.0000.01118.79
8.3.110.0030.00620.94
8.3.100.0030.00724.06
8.3.90.0080.00026.77
8.3.80.0030.00619.36
8.3.70.0090.00616.74
8.3.60.0070.01116.50
8.3.50.0140.00418.27
8.3.40.0080.01220.52
8.3.30.0070.00720.34
8.3.20.0000.00924.18
8.3.10.0100.01024.66
8.3.00.0150.00424.66
8.2.290.0120.00620.22
8.2.280.0080.01018.18
8.2.270.0050.01419.07
8.2.260.0060.00320.01
8.2.250.0040.01118.21
8.2.240.0080.00818.74
8.2.230.0060.00322.58
8.2.220.0060.00337.54
8.2.210.0130.01026.77
8.2.200.0050.00318.88
8.2.190.0100.00716.58
8.2.180.0170.00316.63
8.2.170.0140.00718.91
8.2.160.0100.00322.96
8.2.150.0040.00425.66
8.2.140.0060.01224.66
8.2.130.0040.01424.66
8.2.120.0140.00724.66
8.2.110.0100.01024.66
8.2.100.0070.01124.66
8.2.90.0090.01324.66
8.2.80.0140.00724.66
8.2.70.0150.00024.66
8.2.60.0070.01424.66
8.2.50.0060.00924.66
8.2.40.0200.00024.66
8.2.30.0140.00724.66
8.2.20.0120.00324.66
8.2.10.0100.00724.66
8.2.00.0080.00824.66
8.1.330.0100.00821.75
8.1.320.0120.00816.10
8.1.310.0050.00316.77
8.1.300.0070.01120.17
8.1.290.0090.00030.84
8.1.280.0170.00325.92
8.1.270.0040.00424.66
8.1.260.0110.00424.66
8.1.250.0080.00024.66
8.1.240.0040.00424.66
8.1.230.0040.00424.66
8.1.220.0000.00824.66
8.1.210.0050.00324.66
8.1.200.0050.00324.66
8.1.190.0140.00024.66
8.1.180.0060.00324.66
8.1.170.0040.00424.66
8.1.160.0000.00824.66
8.1.150.0040.01124.66
8.1.140.0030.00624.66
8.1.130.0110.00424.66
8.1.120.0130.00324.66
8.1.110.0030.01324.66
8.1.100.0000.00824.66
8.1.90.0040.00424.66
8.1.80.0100.00624.66
8.1.70.0060.00324.66
8.1.60.0030.00624.66
8.1.50.0080.00024.66
8.1.40.0080.00024.66
8.1.30.0100.00624.66
8.1.20.0090.00624.66
8.1.10.0050.00324.66
8.1.00.0060.00624.66

preferences:
31.82 ms | 403 KiB | 5 Q