3v4l.org

run code in 300+ PHP versions simultaneously
<?php function multiexplode ($delimiters,$string) { $ready = str_replace($delimiters, $delimiters[0], $string); $launch = explode($delimiters[0], $ready); return $launch; } $text = "När:Sent lördag kväll och natt till söndag\nVar:Främst norra Jämtland\nIntensitet:Väst ca 21 m/s\nKommentar:-"; $exploded = multiexplode(array("\n",":"), $text); $result = array_intersect_key($exploded, array_flip(range(1,count($exploded),2))); print_r($result);

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.60.0120.00318.43
8.3.50.0120.00416.38
8.3.40.0070.01018.75
8.3.30.0130.00618.54
8.3.20.0040.00420.40
8.3.10.0000.00721.96
8.3.00.0000.00822.39
8.2.180.0110.00725.92
8.2.170.0070.00722.96
8.2.160.0170.00321.23
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0050.00319.25
8.2.110.0040.00722.26
8.2.100.0040.00717.91
8.2.90.0040.00417.78
8.2.80.0060.00317.97
8.2.70.0000.00817.63
8.2.60.0080.00017.93
8.2.50.0040.00418.07
8.2.40.0030.00518.16
8.2.30.0040.00418.13
8.2.20.0040.00418.00
8.2.10.0000.00719.34
8.2.00.0000.00718.02
8.1.280.0110.00425.92
8.1.270.0040.00423.77
8.1.260.0080.00026.35
8.1.250.0050.00228.09
8.1.240.0060.00320.89
8.1.230.0040.00820.89
8.1.220.0000.00817.74
8.1.210.0080.00318.78
8.1.200.0060.00317.35
8.1.190.0000.00817.23
8.1.180.0060.00318.10
8.1.170.0000.00718.92
8.1.160.0000.00718.89
8.1.150.0000.00818.90
8.1.140.0040.00422.18
8.1.130.0000.00720.19
8.1.120.0070.00017.53
8.1.110.0040.00717.45
8.1.100.0080.00017.50
8.1.90.0000.00717.31
8.1.80.0000.00817.42
8.1.70.0060.00317.36
8.1.60.0060.00317.62
8.1.50.0050.00217.55
8.1.40.0060.00317.42
8.1.30.0000.00817.65
8.1.20.0030.00617.59
8.1.10.0000.00717.38
8.1.00.0040.00417.43
8.0.300.0000.00719.98
8.0.290.0040.00416.75
8.0.280.0070.00018.37
8.0.270.0000.00717.12
8.0.260.0070.00018.39
8.0.250.0030.00516.79
8.0.240.0000.00616.73
8.0.230.0030.00516.76
8.0.220.0040.00416.84
8.0.210.0030.00316.87
8.0.200.0030.00316.80
8.0.190.0000.00816.88
8.0.180.0050.00316.91
8.0.170.0030.00516.97
8.0.160.0000.00816.81
8.0.150.0030.00316.68
8.0.140.0080.00016.70
8.0.130.0000.00613.30
8.0.120.0040.00416.74
8.0.110.0050.00316.79
8.0.100.0040.00416.89
8.0.90.0040.00416.83
8.0.80.0090.00616.87
8.0.70.0040.00416.81
8.0.60.0040.00416.93
8.0.50.0000.00816.98
8.0.30.0150.00517.08
8.0.20.0080.01317.00
8.0.10.0000.00716.96
8.0.00.0100.00916.77
7.4.330.0000.00516.67
7.4.320.0000.00716.53
7.4.300.0030.00616.50
7.4.290.0070.00016.52
7.4.280.0000.00816.61
7.4.270.0030.00316.46
7.4.260.0050.00316.51
7.4.250.0000.00816.42
7.4.240.0070.00016.50
7.4.230.0040.00416.42
7.4.220.0000.00716.41
7.4.210.0050.01016.50
7.4.200.0070.00016.64
7.4.160.0120.00616.47
7.4.140.0030.01317.86
7.4.130.0180.00716.39
7.4.120.0070.01416.45
7.4.110.0030.01316.46
7.4.100.0030.01416.54
7.4.90.0090.00816.40
7.4.80.0090.01119.39
7.4.70.0170.00616.55
7.4.60.0120.00416.51
7.4.50.0060.00616.39
7.4.40.0110.00716.36
7.4.00.0060.00914.60
7.3.330.0000.00513.38
7.3.320.0000.00613.18
7.3.310.0030.00316.46
7.3.300.0030.00316.34
7.3.290.0030.00316.30
7.3.280.0030.01316.27
7.3.260.0100.01016.50
7.3.240.0090.01016.41
7.3.230.0090.00916.25
7.3.210.0070.01416.44
7.3.200.0060.00916.30
7.3.190.0060.01216.53
7.3.180.0060.01616.35
7.3.170.0090.00916.51
7.3.160.0070.01016.32
7.3.30.0030.01414.86
7.3.20.0490.00714.78
7.3.10.0510.01014.59
7.3.00.0660.00714.57
7.2.330.0090.00616.74
7.2.320.0120.00616.75
7.2.310.0030.01616.40
7.2.300.0140.00216.77
7.2.290.0100.01416.80
7.2.160.0120.00815.02
7.2.150.0520.00615.07
7.2.140.1320.00715.11
7.2.130.0450.01015.16
7.2.120.0480.00614.91
7.2.110.0610.01014.83
7.2.100.0480.00715.14
7.2.90.0510.00315.07
7.2.80.0470.01314.90
7.2.70.0500.00315.19
7.2.60.0590.01015.04
7.2.50.0570.01014.98
7.2.40.0600.01015.17
7.2.30.0560.01014.95
7.2.20.0560.00714.96
7.2.10.0630.01014.96
7.2.00.0520.01114.91
7.1.270.0470.00713.85
7.1.260.0490.00713.68
7.1.250.0490.00714.05

preferences:
29.89 ms | 400 KiB | 5 Q