3v4l.org

run code in 300+ PHP versions simultaneously
<?php $items = [ "3000mAh battery", "charges 1 smartphone", "input: 5W (5V, 1A) micro USB port", "output: Micro USB cable: 7.5W (5V, 1.5A)", "recharge time 3-4 hours", "includes Micro USB cable", "1-Year Limited Warranty" ]; $result = []; foreach ($items as $item) { $res = explode(':', $item); if (count($res) > 1) { $key = $res[0]; array_shift($res); $result[$key] = implode(':', $res); continue; } if (is_numeric($item[0])) { $parts = (explode(' ', $item)); $key = array_pop($parts); $result[$key] = implode(' ', $parts); continue; } if (ctype_alpha ($item[0])) { $parts = explode(' ', $item); $key = array_shift($parts); $result[$key] = implode(' ', $parts); } } 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.5.10.0110.00816.61
8.5.00.0120.01121.55
8.4.150.0030.00014.05
8.4.140.0110.01017.32
8.4.130.0090.00717.87
8.4.120.0040.00720.57
8.4.110.0150.00522.52
8.4.100.0140.00717.63
8.4.90.0150.00618.57
8.4.80.0120.00817.99
8.4.70.0150.00717.77
8.4.60.0060.00418.70
8.4.50.0040.00520.31
8.4.40.0150.00619.31
8.4.30.0100.00719.54
8.4.20.0110.00018.70
8.4.10.0080.00018.88
8.3.280.0120.00720.10
8.3.270.0110.01016.67
8.3.260.0160.00416.56
8.3.250.0090.01018.83
8.3.240.0100.00816.68
8.3.230.0100.01016.57
8.3.220.0090.01017.23
8.3.210.0030.00416.60
8.3.200.0030.00516.61
8.3.190.0110.00816.85
8.3.180.0140.00518.19
8.3.170.0070.01116.95
8.3.160.0040.01418.32
8.3.150.0120.00816.80
8.3.140.0120.00317.36
8.3.130.0050.00318.61
8.3.120.0160.00318.93
8.3.110.0090.00016.38
8.3.100.0060.00318.46
8.3.90.0100.01026.77
8.3.80.0060.00617.97
8.3.70.0030.01216.50
8.3.60.0150.00618.43
8.3.50.0100.00817.52
8.3.40.0070.01118.66
8.3.30.0120.00618.48
8.3.20.0040.00420.93
8.3.10.0040.00423.53
8.3.00.0030.00521.85
8.2.290.0070.01120.36
8.2.280.0050.00518.50
8.2.270.0120.00617.40
8.2.260.0050.00316.67
8.2.250.0130.01016.84
8.2.240.0070.00718.77
8.2.230.0030.00720.94
8.2.220.0030.00624.06
8.2.210.0050.00326.77
8.2.200.0040.00818.88
8.2.190.0030.01418.33
8.2.180.0150.00016.48
8.2.170.0120.00622.96
8.2.160.0100.00720.39
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0050.00319.89
8.2.110.0060.00320.36
8.2.100.0000.01117.84
8.2.90.0030.00617.63
8.2.80.0000.00818.82
8.2.70.0060.00317.63
8.2.60.0040.00417.93
8.2.50.0030.00518.07
8.2.40.0000.00818.32
8.2.30.0090.00018.13
8.2.20.0040.00418.07
8.2.10.0050.00218.15
8.2.00.0040.00419.49
8.1.330.0130.00521.95
8.1.320.0130.00615.98
8.1.310.0070.01118.40
8.1.300.0060.00320.30
8.1.290.0060.00330.84
8.1.280.0120.00325.92
8.1.270.0000.00822.18
8.1.260.0050.00226.35
8.1.250.0030.00628.09
8.1.240.0060.00319.07
8.1.230.0040.00817.89
8.1.220.0000.00817.74
8.1.210.0050.00318.77
8.1.200.0040.00417.48
8.1.190.0060.00317.23
8.1.180.0080.00018.10
8.1.170.0040.00818.57
8.1.160.0040.00418.92
8.1.150.0020.00518.88
8.1.140.0070.00022.20
8.1.130.0030.00317.39
8.1.120.0030.00317.43
8.1.110.0030.00717.47
8.1.100.0020.00517.46
8.1.90.0000.00717.48
8.1.80.0040.00417.40
8.1.70.0030.00317.50
8.1.60.0050.00317.52
8.1.50.0000.00817.55
8.1.40.0040.00417.55
8.1.30.0030.00617.63
8.1.20.0040.00417.66
8.1.10.0030.00617.47
8.1.00.0050.00317.53
8.0.300.0000.00718.77
8.0.290.0040.00416.75
8.0.280.0000.00818.46
8.0.270.0000.00717.19
8.0.260.0000.00716.75
8.0.250.0030.00316.95
8.0.240.0000.00716.94
8.0.230.0020.00516.88
8.0.220.0030.00716.83
8.0.210.0030.00316.84
8.0.200.0030.00316.93
8.0.190.0050.00316.86
8.0.180.0070.00016.97
8.0.170.0000.00816.93
8.0.160.0000.00816.81
8.0.150.0040.00416.92
8.0.140.0040.00416.88
8.0.130.0000.00513.42
8.0.120.0000.00816.76
8.0.110.0000.00716.73
8.0.100.0000.00716.90
8.0.90.0050.00216.76
8.0.80.0040.01816.88
8.0.70.0070.00016.69
8.0.60.0000.00816.98
8.0.50.0040.00416.96
8.0.30.0100.00617.21
8.0.20.0110.00917.40
8.0.10.0080.00017.03
8.0.00.0130.00816.75
7.4.330.0050.00016.59
7.4.320.0060.00416.48
7.4.300.0030.00316.67
7.4.290.0040.00416.53
7.4.280.0000.00716.66
7.4.270.0050.00316.63
7.4.260.0070.00016.54
7.4.250.0030.00316.57
7.4.240.0030.00316.54
7.4.230.0000.00816.41
7.4.220.0040.00416.44
7.4.210.0030.01116.58
7.4.200.0040.00416.53
7.4.160.0070.00916.62
7.4.140.0110.00817.86
7.4.130.0130.01016.68
7.4.120.0120.00716.51
7.4.110.0040.01816.53
7.4.100.0080.00816.47
7.4.90.0140.00316.68
7.4.80.0130.00919.39
7.4.70.0080.00816.43
7.4.60.0070.01016.39
7.4.50.0000.01616.21
7.4.40.0130.00316.41
7.4.00.0050.01214.84
7.3.330.0050.00013.27
7.3.320.0060.00013.15
7.3.310.0030.00316.44
7.3.300.0000.00616.20
7.3.290.0070.00016.36
7.3.280.0050.01216.35
7.3.260.0100.00916.44
7.3.240.0120.00816.47
7.3.230.0150.00616.55
7.3.210.0030.01516.45
7.3.200.0100.00716.54
7.3.190.0120.01216.30
7.3.180.0090.00916.49
7.3.170.0120.00616.45
7.3.160.0120.00916.34
7.3.120.0050.00914.96
7.3.110.0050.00914.86
7.3.100.0030.01115.07
7.3.90.0030.01014.89
7.3.80.0080.00714.83
7.3.70.0050.01214.90
7.3.60.0090.00614.87
7.3.50.0070.00614.82
7.3.40.0090.00714.64
7.3.30.0050.00814.89
7.3.20.0090.00516.77
7.3.10.0040.00916.65
7.3.00.0090.00716.66
7.2.330.0070.01416.43
7.2.320.0090.00916.64
7.2.310.0080.00816.77
7.2.300.0120.00616.54
7.2.290.0030.01416.71
7.2.250.0030.01415.19
7.2.240.0080.00615.03
7.2.230.0020.01115.19
7.2.220.0080.00314.86
7.2.210.0020.01115.03
7.2.200.0080.00815.18
7.2.190.0080.00914.97
7.2.180.0050.01115.00
7.2.170.0070.00915.00
7.2.160.0070.00714.98
7.2.150.0090.00916.93
7.2.140.0050.00516.97
7.2.130.0090.00516.90
7.2.120.0220.00615.80
7.2.110.0220.00715.88
7.2.100.0180.01015.92
7.2.90.0190.01115.92
7.2.80.0300.00915.87
7.2.70.0240.00515.85
7.2.60.0220.00815.90
7.2.50.0210.00915.95
7.2.40.0390.00915.86
7.2.30.0280.00815.97
7.2.20.0260.00816.04
7.2.10.0220.01015.97
7.2.00.0240.00915.89
7.1.330.0080.00615.81
7.1.320.0040.01015.77
7.1.310.0050.01015.90
7.1.300.0090.00415.68
7.1.290.0090.00615.96
7.1.280.0040.01215.97
7.1.270.0060.00715.91
7.1.260.0030.01015.71
7.1.250.0020.00815.70
7.1.240.0360.00513.98
7.1.230.0300.00513.69
7.1.220.0380.00413.92
7.1.210.0400.00313.95
7.1.200.0400.00513.90
7.1.190.0290.00614.02
7.1.180.0270.00813.94
7.1.170.0260.00913.95
7.1.160.0370.00513.90
7.1.150.0350.00813.67
7.1.140.0460.00713.83
7.1.130.0320.00813.92
7.1.120.0350.01013.90
7.1.110.0360.00713.79
7.1.100.0320.00814.05
7.1.90.0380.00513.91
7.1.80.0430.00813.74
7.1.70.0410.01113.76
7.1.60.0940.00713.81
7.1.50.0410.00513.79
7.1.40.0360.00513.91
7.1.30.0400.01013.87
7.1.20.0350.00613.70
7.1.10.0450.00713.89
7.1.00.0500.00913.86
5.6.380.0080.00714.23

preferences:
38.66 ms | 403 KiB | 5 Q