3v4l.org

run code in 300+ PHP versions simultaneously
<?php $txt = "lookSTARTfromhereSTARTagainhere"; $arr = explode("START", $txt); // Explode on START unset($arr[0]); // first item is before START, we don't need that. $res = []; foreach($arr as $val){ $temp = str_split($val, 4); // Split array item on four letters. $res = array_merge($res, $temp); // merge the new array with result array } var_dump($res);

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.70.0070.01116.88
8.3.60.0040.01116.63
8.3.50.0110.01416.62
8.3.40.0090.00618.89
8.3.30.0100.01018.55
8.3.20.0040.00420.21
8.3.10.0050.00323.61
8.3.00.0040.00423.68
8.2.190.0100.01016.58
8.2.180.0140.00316.38
8.2.170.0110.00319.04
8.2.160.0070.00722.96
8.2.150.0080.00025.66
8.2.140.0090.00024.66
8.2.130.0080.00022.25
8.2.120.0040.00426.35
8.2.110.0060.00321.90
8.2.100.0110.00017.91
8.2.90.0040.00417.88
8.2.80.0080.00018.73
8.2.70.0030.00517.63
8.2.60.0080.00017.63
8.2.50.0000.00818.22
8.2.40.0040.00422.15
8.2.30.0040.00421.02
8.2.20.0040.00418.13
8.2.10.0000.00718.03
8.2.00.0040.00418.18
8.1.280.0060.00925.92
8.1.270.0060.00323.88
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0000.00922.13
8.1.230.0070.00419.55
8.1.220.0040.00418.50
8.1.210.0060.00318.77
8.1.200.0050.00317.35
8.1.190.0080.00017.22
8.1.180.0000.00818.10
8.1.170.0080.00018.68
8.1.160.0040.00418.96
8.1.150.0080.00018.93
8.1.140.0000.00717.80
8.1.130.0030.00318.95
8.1.120.0050.00517.54
8.1.110.0050.00217.49
8.1.100.0030.00717.45
8.1.90.0040.00417.35
8.1.80.0050.00217.43
8.1.70.0000.00717.39
8.1.60.0040.00417.47
8.1.50.0070.00017.58
8.1.40.0030.00617.41
8.1.30.0030.00517.66
8.1.20.0000.00717.69
8.1.10.0040.00417.46
8.1.00.0000.00717.41
8.0.300.0040.00418.77
8.0.290.0000.00716.75
8.0.280.0070.00018.44
8.0.270.0000.00716.82
8.0.260.0070.00016.82
8.0.250.0030.00316.98
8.0.240.0050.00216.79
8.0.230.0030.00516.96
8.0.220.0070.00016.78
8.0.210.0000.00716.80
8.0.200.0000.00716.91
8.0.190.0000.00816.96
8.0.180.0040.00416.98
8.0.170.0000.00816.87
8.0.160.0040.00416.91
8.0.150.0050.00316.93
8.0.140.0050.00316.84
8.0.130.0030.00313.25
8.0.120.0030.00516.79
8.0.110.0050.00216.71
8.0.100.0000.00716.85
8.0.90.0040.00417.01
8.0.80.0130.01016.87
8.0.70.0080.00016.95
8.0.60.0030.00316.84
8.0.50.0090.00016.82
8.0.30.0130.00417.31
8.0.20.0080.01217.40
8.0.10.0050.00317.00
8.0.00.0140.00516.57
7.4.330.0020.00216.63
7.4.320.0040.00416.52
7.4.300.0000.00816.57
7.4.290.0030.00316.57
7.4.280.0040.00416.55
7.4.270.0050.00316.60
7.4.260.0000.00716.48
7.4.250.0030.00316.47
7.4.240.0030.00516.52
7.4.230.0000.00716.58
7.4.220.0110.00616.57
7.4.210.0130.00316.64
7.4.200.0040.00416.61
7.4.160.0110.00816.56
7.4.150.0090.00917.40
7.4.140.0110.00917.86
7.4.130.0120.00616.37
7.4.120.0110.00816.48
7.4.110.0140.01016.61
7.4.100.0070.01516.30
7.4.90.0070.01116.32
7.4.80.0070.01019.39
7.4.70.0090.01416.50
7.4.60.0060.00916.54
7.4.50.0100.00616.54
7.4.40.0150.00816.74
7.4.30.0100.00716.59
7.4.00.0100.00814.70
7.3.330.0000.00513.25
7.3.320.0000.00613.18
7.3.310.0040.00416.32
7.3.300.0050.00216.25
7.3.290.0080.00716.24
7.3.280.0070.00916.28
7.3.270.0030.01517.40
7.3.260.0130.01016.42
7.3.250.0120.00916.23
7.3.240.0120.00816.34
7.3.230.0120.00416.38
7.3.210.0170.00016.61
7.3.200.0100.01316.54
7.3.190.0030.01216.26
7.3.180.0150.00416.44
7.3.170.0090.00616.29
7.3.160.0110.01116.52
7.3.120.0070.01014.73
7.3.110.0100.00714.91
7.3.100.0070.00714.76
7.3.90.0070.00714.74
7.3.80.0060.00315.00
7.3.70.0000.01714.76
7.3.60.0060.00914.96
7.3.50.0040.00814.77
7.3.40.0030.01014.88
7.3.30.0000.01314.91
7.3.20.0060.00616.39
7.3.10.0070.00616.51
7.3.00.0110.00816.38
7.2.330.0090.00916.71
7.2.320.0070.01016.71
7.2.310.0060.01216.73
7.2.300.0100.00616.46
7.2.290.0120.00316.47
7.2.250.0040.01515.22
7.2.240.0040.00715.24
7.2.230.0080.00514.81
7.2.220.0080.00814.99
7.2.210.0060.01015.20
7.2.200.0070.01115.12
7.2.190.0030.01314.89
7.2.180.0110.00015.18
7.2.170.0100.00314.81
7.2.130.0140.00916.76
7.2.120.0070.00916.75
7.2.110.0130.01016.84
7.2.100.0100.00916.57
7.2.90.0140.00616.63
7.2.80.0120.00516.72
7.2.70.0110.01016.68
7.2.60.0100.00816.53
7.2.50.0070.01116.48
7.2.40.0100.00816.59
7.2.30.0130.00616.76
7.2.20.0110.00716.64
7.2.10.0110.00816.70
7.2.00.0060.01116.80
7.1.330.0030.01215.73
7.1.320.0030.01015.82
7.1.310.0000.01215.79
7.1.300.0060.01015.64
7.1.290.0070.00415.90
7.1.280.0070.01015.57
7.1.270.0100.00315.79
7.1.260.0100.00315.49
7.1.250.0110.00515.59
7.1.240.0130.00715.41
7.1.230.0150.00615.71
7.1.220.0090.01315.43
7.1.210.0120.01215.50
7.1.200.0130.00615.63
7.1.190.0150.00915.40
7.1.180.0160.00815.68
7.1.170.0100.01315.82
7.1.160.0110.01115.74
7.1.150.0140.01015.56
7.1.140.0120.00815.57
7.1.130.0150.00615.66
7.1.120.0210.00315.47
7.1.110.0180.00516.90
7.1.100.0130.00617.04
7.1.90.0130.00916.96
7.1.80.0110.00817.01
7.1.70.0130.00916.42
7.1.60.0200.00825.24
7.1.50.0090.01525.27
7.1.40.0240.00224.83
7.1.30.0130.01225.08
7.1.20.0170.00725.16
7.1.10.0060.01216.18
7.1.00.0090.00816.08
7.0.330.0090.00915.28
7.0.320.0110.00415.19
7.0.310.0130.00315.35
7.0.300.0090.00915.36
7.0.290.0110.00415.50
7.0.280.0080.01215.36
7.0.270.0060.01015.13
7.0.260.0030.01015.36
7.0.250.0090.00716.32
7.0.240.0120.00616.40
7.0.230.0100.00916.51
7.0.220.0060.01116.49
7.0.210.0120.00315.98
7.0.200.0050.00916.16
7.0.190.0050.00915.82
7.0.180.0080.00915.57
7.0.170.0100.00615.81
7.0.160.0130.00315.63
7.0.150.0040.01315.72
7.0.140.0030.01215.68
7.0.130.0100.00815.94
7.0.120.0080.00815.93
7.0.110.0070.00915.64
7.0.100.0040.01415.98
7.0.90.0080.00715.86
7.0.80.0090.00515.93
7.0.70.0090.00615.58
7.0.60.0120.00415.78
7.0.50.0060.00915.89
7.0.40.0060.00614.88
7.0.30.0050.00514.90
7.0.20.0050.00614.68
7.0.10.0030.00914.88
7.0.00.0070.00614.89
5.6.380.0110.00614.10

preferences:
67.01 ms | 401 KiB | 5 Q