3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = <<<'EOF' text 16.11 19.22 21.33 text 17.11 23.22 25.33 27.55 text 18.11 26.22 EOF; echo 'Если не завязываться на количестве пробелов: ', PHP_EOL; $res = []; $lines = preg_split('#[\n\r]+#', trim($str)); foreach ($lines as $line) { $prices = preg_split('#\s+#', $line); $key = array_shift($prices); $res[] = ['key' => $key, 'prices' => $prices]; } echo json_encode($res), PHP_EOL;

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.0100.00618.80
8.3.50.0080.00818.30
8.3.40.0000.01518.92
8.3.30.0110.00419.21
8.3.20.0090.00621.02
8.3.10.0080.00019.96
8.3.00.0050.00323.46
8.2.180.0080.00818.31
8.2.170.0070.01022.96
8.2.160.0120.00321.14
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0060.00326.16
8.2.110.0070.00321.04
8.2.100.0100.00318.16
8.2.90.0080.00017.75
8.2.80.0050.00317.97
8.2.70.0040.00418.05
8.2.60.0000.00818.22
8.2.50.0030.00518.10
8.2.40.0080.00021.19
8.2.30.0030.00619.31
8.2.20.0070.00018.21
8.2.10.0030.00619.31
8.2.00.0000.00719.38
8.1.280.0190.00325.92
8.1.270.0040.00422.02
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0100.00019.41
8.1.230.0090.00321.03
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0090.00017.48
8.1.190.0060.00317.48
8.1.180.0080.00418.10
8.1.170.0040.00418.71
8.1.160.0020.00519.00
8.1.150.0090.00018.86
8.1.140.0070.00019.02
8.1.130.0000.00919.44
8.1.120.0030.00517.63
8.1.110.0090.00017.50
8.1.100.0000.00717.66
8.1.90.0000.01117.55
8.1.80.0030.00517.46
8.1.70.0030.00317.57
8.1.60.0060.00317.65
8.1.50.0050.00317.68
8.1.40.0000.00817.69
8.1.30.0040.00417.80
8.1.20.0060.00617.72
8.1.10.0070.00317.69
8.1.00.0060.00317.69
8.0.300.0080.00019.86
8.0.290.0040.00416.88
8.0.280.0040.00418.46
8.0.270.0070.00017.20
8.0.260.0050.00316.94
8.0.250.0060.00017.14
8.0.240.0000.00717.15
8.0.230.0000.00717.18
8.0.220.0030.00317.20
8.0.210.0050.00217.06
8.0.200.0000.00617.18
8.0.190.0040.00417.17
8.0.180.0030.00517.14
8.0.170.0000.00817.02
8.0.160.0030.00617.12
8.0.150.0040.00417.03
8.0.140.0040.00417.05
8.0.130.0000.00613.55
8.0.120.0000.00717.13
8.0.110.0000.00717.23
8.0.100.0070.00017.03
8.0.90.0000.00717.16
8.0.80.0100.01017.05
8.0.70.0000.00817.05
8.0.60.0040.00416.96
8.0.50.0030.00717.18
8.0.30.0100.00517.23
8.0.20.0100.00817.47
8.0.10.0000.00717.19
8.0.00.0110.00817.18
7.4.330.0050.00015.55
7.4.320.0030.00316.89
7.4.300.0060.00016.91
7.4.290.0000.00816.88
7.4.280.0080.00416.82
7.4.270.0070.00016.78
7.4.260.0030.00316.75
7.4.250.0070.00016.74
7.4.240.0060.00216.79
7.4.230.0000.00716.62
7.4.220.0040.00416.52
7.4.210.0110.00516.82
7.4.200.0030.00516.93
7.4.130.0180.00616.79
7.4.120.0090.00916.69
7.4.110.0130.00716.65
7.4.100.0150.00316.87
7.4.90.0160.00316.71
7.4.80.0070.01619.39
7.4.70.0100.00616.87
7.4.60.0130.00316.63
7.4.50.0110.00216.54
7.4.40.0110.00716.70
7.4.00.0070.01015.26
7.3.330.0000.00513.34
7.3.320.0000.00613.27
7.3.310.0000.00816.58
7.3.300.0000.00616.57
7.3.290.0030.00616.36
7.3.280.0050.01116.49
7.3.260.0100.00716.59
7.3.240.0070.01116.78
7.3.230.0030.01516.57
7.3.210.0160.00016.58
7.3.200.0140.00316.65
7.3.190.0100.00616.76
7.3.180.0090.00716.66
7.3.170.0090.00916.78
7.3.160.0080.01216.86
7.3.60.0060.00614.48
7.3.50.0140.00315.00
7.3.40.0000.01214.98
7.3.30.0090.00314.76
7.3.20.0100.01416.58
7.3.10.0060.01216.75
7.3.00.0100.01016.68
7.2.330.0170.00716.77
7.2.320.0110.00716.91
7.2.310.0000.01716.83
7.2.300.0070.01017.04
7.2.290.0030.01316.83
7.2.190.0100.01014.89
7.2.180.0040.00715.22
7.2.170.0060.00615.12
7.2.160.0080.00415.03
7.2.150.0130.00616.71
7.2.140.0120.00916.91
7.2.130.0030.01317.03
7.2.120.0110.00417.04
7.2.110.0110.00317.04
7.2.100.0000.01317.05
7.2.90.0090.00617.22
7.2.80.0030.01316.94
7.2.70.0030.01216.87
7.2.60.0080.00317.00
7.2.50.0120.01717.16
7.2.40.0160.00617.07
7.2.30.0070.01117.19
7.2.20.0120.00017.10
7.2.10.0030.01617.10
7.2.00.0090.00317.04
7.1.300.0110.01516.09
7.1.290.0090.00316.06
7.1.280.0040.01815.86
7.1.270.0090.01016.14
7.1.260.0110.00815.93
7.1.250.0080.00315.93

preferences:
42.74 ms | 401 KiB | 5 Q