3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = ['kalem', ['elma', 'armut'], 'silgi', 'defter', 'kitap', 'çanta']; if (in_array('kalem', $arr)) echo 'Kalem var'.PHP_EOL; if (in_array(['elma', 'armut'], $arr)) echo 'içinde sadece elma ve armut olan bir dizi var'. PHP_EOL; if (in_array(['silgi', 'defter'], $arr)) echo 'Burası çalışmayacak'; else echo 'Bu fonksiyon dizi içerisindeki elemanları bu şekilde ayrı ayrı kontrol etmez!'. PHP_EOL; #Biz kendimiz yazalım, AYNI ANDA bir array içindeki değerleri kontrol etsin function in_array_(array $search, array $array): bool { foreach ($search as $item): if (!in_array($item, $array)) return false; endforeach; return true; } $search = ['kitap', 'çanta']; if (in_array_($search, $arr)) echo 'Aranan değerler dizide mecvut'. PHP_EOL; $search = ['kitap', 'çanta', ['elma', 'armut']]; if (in_array_($search, $arr)) echo 'Aranan değerler dizide mecvut. Array içinde array de arayabiliriz'. PHP_EOL; $search = ['kitap', 'çanta', 'masa']; if (in_array_($search, $arr)) echo 'Burası çalışmayacak'. PHP_EOL; else echo 'Aranan elemanlardan bir tanesi bile dizide yoksa sonuç FALSE döner';

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.140.0030.00517.21
8.3.130.0040.00418.46
8.3.120.0040.00420.59
8.3.110.0080.01220.94
8.3.100.0070.00324.06
8.3.90.0070.00726.77
8.3.80.0080.00020.06
8.3.70.0120.00318.30
8.3.60.0140.00018.18
8.3.50.0060.01316.33
8.3.40.0090.00618.85
8.3.30.0110.00418.72
8.3.20.0080.00024.18
8.3.10.0000.00824.66
8.3.00.0040.00426.16
8.2.250.0050.00316.42
8.2.240.0080.00016.92
8.2.230.0030.00622.58
8.2.220.0060.00337.54
8.2.210.0000.00726.77
8.2.200.0060.00316.63
8.2.190.0070.00716.58
8.2.180.0120.00625.92
8.2.170.0150.00019.05
8.2.160.0100.00322.96
8.2.150.0000.00725.66
8.2.140.0000.00724.66
8.2.130.0050.00326.16
8.2.120.0040.00426.35
8.2.110.0110.00722.07
8.2.100.0030.00917.78
8.2.90.0040.00417.72
8.2.80.0040.00417.97
8.2.70.0050.00517.63
8.2.60.0000.00817.68
8.2.50.0040.00418.07
8.2.40.0000.00818.09
8.2.30.0040.00418.06
8.2.20.0040.00418.06
8.2.10.0040.00419.28
8.2.00.0050.00519.12
8.1.300.0060.00918.20
8.1.290.0070.00318.88
8.1.280.0090.00625.92
8.1.270.0030.00622.14
8.1.260.0100.01026.35
8.1.250.0040.00428.09
8.1.240.0080.00422.59
8.1.230.0040.00820.77
8.1.220.0080.00017.79
8.1.210.0000.00818.82
8.1.200.0000.00917.35
8.1.190.0060.00317.11
8.1.180.0000.00918.10
8.1.170.0050.00518.45
8.1.160.0080.00018.89
8.1.150.0040.00418.93
8.1.140.0030.00618.80
8.1.130.0030.00320.04
8.1.120.0030.00617.44
8.1.110.0000.00717.41
8.1.100.0000.00717.35
8.1.90.0040.00417.35
8.1.80.0070.00317.36
8.1.70.0050.00317.44
8.1.60.0040.00417.59
8.1.50.0040.00417.41
8.1.40.0030.00517.40
8.1.30.0050.00217.66
8.1.20.0040.00417.58
8.1.10.0040.00417.41
8.1.00.0040.00417.32
8.0.300.0040.00419.94
8.0.290.0060.00316.75
8.0.280.0000.00720.25
8.0.270.0030.00317.92
8.0.260.0060.00018.48
8.0.250.0000.00716.86
8.0.240.0040.00417.00
8.0.230.0030.00316.84
8.0.220.0070.00016.80
8.0.210.0030.00316.93
8.0.200.0090.00016.97
8.0.190.0040.00416.85
8.0.180.0040.00416.96
8.0.170.0080.00016.91
8.0.160.0070.00016.86
8.0.150.0060.00316.71
8.0.140.0000.00816.83
8.0.130.0000.00613.32
8.0.120.0040.00416.82
8.0.110.0040.00416.87
8.0.100.0000.00816.85
8.0.90.0000.00716.77
8.0.80.0080.01016.87
8.0.70.0000.00816.72
8.0.60.0050.00316.76
8.0.50.0040.00416.68
8.0.30.0080.00816.86
8.0.20.0060.01316.88
8.0.10.0130.00916.98
8.0.00.0130.00817.01
7.4.330.0050.00015.55
7.4.320.0030.00316.50
7.4.300.0030.00316.50
7.4.290.0070.00016.52
7.4.280.0000.00716.52
7.4.270.0040.00416.52
7.4.260.0030.00313.27
7.4.250.0040.00416.53
7.4.240.0040.00316.56
7.4.230.0000.00716.67
7.4.220.0020.00516.41
7.4.210.0080.00916.58
7.4.200.0070.00016.67
7.4.160.0080.01216.63
7.4.150.0100.01116.49
7.4.140.0090.01116.48
7.4.130.0070.01316.39
7.4.120.0110.01016.39
7.4.110.0180.00916.47
7.4.100.0120.00916.50
7.4.90.0080.01116.52
7.4.80.0130.01016.42
7.4.70.0090.00816.50
7.4.60.0100.01016.43
7.4.50.0110.00816.42
7.4.40.0150.00616.39
7.4.30.0100.00916.41
7.4.20.0100.00916.39
7.4.10.0070.01216.41
7.4.00.0100.00716.58
7.3.330.0040.00416.34
7.3.320.0060.00013.31
7.3.310.0050.00216.29
7.3.300.0000.00616.27
7.3.290.0030.01316.28
7.3.280.0110.01016.26
7.3.270.0120.01016.29
7.3.260.0080.01216.32
7.3.250.0090.01116.33
7.3.240.0110.00816.31
7.3.230.0150.00516.26
7.3.220.0130.00916.32
7.3.210.0100.00816.31
7.3.200.0110.00816.30
7.3.190.0100.00916.36
7.3.180.0100.00816.25
7.3.170.0120.00816.30
7.3.160.0090.01316.27
7.3.150.0100.00916.29
7.3.140.0110.00916.26
7.3.130.0100.01016.28
7.3.120.0110.00816.21
7.3.110.0110.00916.18
7.3.100.0120.00716.15
7.3.90.0120.01016.53
7.3.80.0160.00416.23
7.3.70.0100.00816.39
7.3.60.0050.01416.42
7.3.50.0110.01016.47
7.3.40.0130.00816.47
7.3.30.0070.01016.49
7.3.20.0090.00816.50
7.3.10.0150.00316.41
7.3.00.0080.00916.39

preferences:
34.83 ms | 403 KiB | 5 Q