3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fruits = array("apple","orange","papaya","grape","apple juice", "applecurd"); $content = "eaplp"; $content = str_split($content); $count = count($content); Foreach($fruits as $fruit){ $arr_fruit = str_split($fruit); $SortCont = array_merge(array_intersect($arr_fruit, $content), array_diff($content, $arr_fruit)); If(array_slice($SortCont, 0, $count) == array_slice($arr_fruit, 0, $count)){ Echo "match: " . $fruit ."\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.3.40.0120.00318.84
8.3.30.0150.00018.54
8.3.20.0060.00321.73
8.3.10.0040.00423.63
8.3.00.0080.00023.71
8.2.170.0090.00922.96
8.2.160.0120.00620.39
8.2.150.0080.00024.18
8.2.140.0070.00724.66
8.2.130.0040.00426.16
8.2.120.0040.00420.82
8.2.110.0030.00619.39
8.2.100.0060.00617.84
8.2.90.0040.00417.84
8.2.80.0080.00017.97
8.2.70.0030.00617.80
8.2.60.0060.00318.16
8.2.50.0050.00318.10
8.2.40.0090.00021.14
8.2.30.0040.00417.62
8.2.20.0040.00418.09
8.2.10.0040.00418.02
8.2.00.0020.00519.33
8.1.270.0040.00420.75
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0030.00722.08
8.1.230.0040.00820.97
8.1.220.0000.01017.74
8.1.210.0040.00418.77
8.1.200.0040.00417.22
8.1.190.0090.00017.23
8.1.180.0040.00418.10
8.1.170.0000.00818.52
8.1.160.0000.00719.00
8.1.150.0040.00418.95
8.1.140.0030.00517.65
8.1.130.0040.00420.73
8.1.120.0030.00517.53
8.1.110.0080.00017.47
8.1.100.0050.00617.48
8.1.90.0040.00417.47
8.1.80.0070.00017.40
8.1.70.0040.00417.50
8.1.60.0060.00617.59
8.1.50.0040.00417.55
8.1.40.0090.00017.54
8.1.30.0030.00617.71
8.1.20.0040.00417.57
8.1.10.0040.00417.54
8.1.00.0030.00617.44
8.0.300.0000.00919.96
8.0.290.0060.00316.63
8.0.280.0000.00718.36
8.0.270.0090.00018.03
8.0.260.0000.00817.15
8.0.250.0030.00317.03
8.0.240.0090.00016.95
8.0.230.0000.00716.95
8.0.220.0000.00716.81
8.0.210.0090.00016.80
8.0.200.0000.00716.94
8.0.190.0000.00917.06
8.0.180.0030.00617.02
8.0.170.0090.00316.96
8.0.160.0050.00316.94
8.0.150.0000.00716.71
8.0.140.0040.00416.89
8.0.130.0030.00313.35
8.0.120.0020.00516.75
8.0.110.0040.00416.91
8.0.100.0030.00616.81
8.0.90.0050.00316.82
8.0.80.0070.00716.89
8.0.70.0000.00716.76
8.0.60.0070.00016.88
8.0.50.0080.00016.88
8.0.30.0070.01217.10
8.0.20.0140.00617.44
8.0.10.0070.00017.08
8.0.00.0070.01216.77
7.4.330.0020.00216.83
7.4.320.0060.00016.62
7.4.300.0070.00016.61
7.4.290.0040.00416.63
7.4.280.0060.00316.44
7.4.270.0040.00716.42
7.4.260.0070.00016.51
7.4.250.0030.00316.47
7.4.240.0000.00716.67
7.4.230.0000.00716.64
7.4.220.0030.00316.44
7.4.210.0040.01116.52
7.4.200.0040.00416.32
7.4.160.0080.00916.49
7.4.140.0090.00817.86
7.4.130.0140.00516.54
7.4.120.0140.00516.58
7.4.110.0100.00716.54
7.4.100.0130.00716.59
7.4.90.0060.01016.59
7.4.80.0080.01219.39
7.4.70.0160.00716.50
7.4.60.0090.00916.36
7.4.50.0120.00316.73
7.4.40.0100.00616.55
7.4.00.0000.01315.01
7.3.330.0050.00013.22
7.3.320.0000.00713.12
7.3.310.0000.00716.22
7.3.300.0000.00616.13
7.3.290.0070.00016.18
7.3.280.0100.00516.25
7.3.260.0110.00516.37
7.3.240.0070.01016.47
7.3.230.0100.00716.34
7.3.210.0050.01116.50
7.3.200.0100.00616.28
7.3.190.0100.01316.39
7.3.180.0060.01616.42
7.3.170.0060.01416.27
7.3.160.0130.00916.33
7.2.330.0100.00716.70
7.2.320.0150.00916.79
7.2.310.0120.01216.76
7.2.300.0070.01516.59
7.2.290.0190.00416.52
7.2.60.0070.00716.70
7.2.40.0480.00918.14
7.2.30.0930.01317.75
7.2.20.0970.00817.62
7.2.10.0690.00717.82
7.2.00.0690.01117.88
7.1.200.0040.00815.64
7.1.160.0730.01216.79
7.1.150.0840.01016.79
7.1.140.0570.00916.70
7.1.130.0650.01016.71
7.1.120.0710.01016.54
7.1.110.0510.00816.34
7.1.100.0450.00715.98
7.1.90.0490.00816.31
7.1.80.1010.01216.17
7.1.70.0650.00815.42
7.1.60.0670.00733.16
7.1.50.0690.01132.86
7.1.40.0720.01432.46
7.1.30.0950.01432.56
7.1.20.0860.01132.63
7.1.10.0560.00714.64
7.1.00.0810.00714.73

preferences:
56.45 ms | 400 KiB | 5 Q