3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "50+16-0*387/2+49"; $digits = []; $symbols = []; foreach (preg_split("/(\d+)/", $str, 0, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE) as $string) { if (ctype_digit($string)) { $digits[] = $string; } else { $symbols[] = $string; } } var_export($digits); echo "\n---\n"; var_export($symbols);

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.4.140.0230.00717.98
8.4.130.0120.00917.88
8.4.120.0120.00920.62
8.4.110.0140.00720.64
8.4.100.0120.00917.58
8.4.90.0120.00817.91
8.4.80.0120.00818.04
8.4.70.0080.00917.71
8.4.60.0100.01018.75
8.4.50.0130.00917.98
8.4.40.0090.00019.81
8.4.30.0100.01020.52
8.4.20.0000.00918.60
8.4.10.0100.00717.87
8.3.270.0080.01116.82
8.3.260.0140.00616.99
8.3.250.0110.00619.23
8.3.240.0020.00619.23
8.3.230.0130.00616.73
8.3.220.0080.00818.58
8.3.210.0090.01216.68
8.3.200.0070.00216.55
8.3.190.0120.00718.88
8.3.180.0050.00518.61
8.3.170.0120.00616.79
8.3.160.0110.00418.38
8.3.150.0090.00917.11
8.3.140.0040.00417.13
8.3.130.0100.00718.69
8.3.120.0080.01119.09
8.3.110.0030.00620.94
8.3.100.0070.00316.92
8.3.90.0110.00326.77
8.3.80.0100.00318.43
8.3.70.0070.00716.88
8.3.60.0040.01216.75
8.3.50.0090.00918.33
8.3.40.0090.00619.01
8.3.30.0090.00618.94
8.3.20.0030.00524.18
8.3.10.0050.00324.66
8.3.00.0000.00826.16
8.2.290.0110.00820.22
8.2.280.0050.00318.36
8.2.270.0110.00716.66
8.2.260.0120.00319.11
8.2.250.0050.00318.57
8.2.240.0030.00518.86
8.2.230.0090.00022.58
8.2.220.0040.00424.06
8.2.210.0000.00826.77
8.2.200.0140.00016.88
8.2.190.0080.00816.88
8.2.180.0150.00025.92
8.2.170.0120.00319.13
8.2.160.0100.00322.96
8.2.150.0080.00025.66
8.2.140.0050.00324.66
8.2.130.0070.00026.16
8.2.120.0040.00426.16
8.2.110.0060.00320.27
8.2.100.0040.00817.91
8.2.90.0000.00818.16
8.2.80.0040.00420.48
8.2.70.0040.00417.87
8.2.60.0040.00417.93
8.2.50.0000.00818.07
8.2.40.0000.00818.14
8.2.30.0080.00018.07
8.2.20.0000.00818.15
8.2.10.0000.00719.38
8.2.00.0000.00819.33
8.1.330.0090.00916.96
8.1.320.0100.00918.00
8.1.310.0040.00418.41
8.1.300.0060.00319.94
8.1.290.0170.00030.84
8.1.280.0120.00625.92
8.1.270.0050.00323.99
8.1.260.0090.00026.35
8.1.250.0000.00828.09
8.1.240.0030.00723.78
8.1.230.0080.00421.04
8.1.220.0030.00517.79
8.1.210.0060.00318.88
8.1.200.0060.00317.48
8.1.190.0000.00817.35
8.1.180.0040.00418.10
8.1.170.0030.00618.62
8.1.160.0070.00018.97
8.1.150.0000.00818.84
8.1.140.0030.00319.04
8.1.130.0000.00720.35
8.1.120.0030.00617.62
8.1.110.0040.00417.50
8.1.100.0000.00817.58
8.1.90.0040.00417.63
8.1.80.0070.00317.55
8.1.70.0030.00317.64
8.1.60.0080.00017.63
8.1.50.0050.00317.56
8.1.40.0000.00817.60
8.1.30.0000.00817.67
8.1.20.0050.00317.82
8.1.10.0000.00917.70
8.1.00.0130.00017.57
8.0.300.0070.00019.89
8.0.290.0060.00316.88
8.0.280.0000.00818.42
8.0.270.0030.00318.07
8.0.260.0000.00718.62
8.0.250.0000.00817.01
8.0.240.0000.00717.14
8.0.230.0070.00016.98
8.0.220.0040.00416.94
8.0.210.0040.00417.10
8.0.200.0060.00017.03
8.0.190.0000.00817.13
8.0.180.0030.00517.05
8.0.170.0050.00317.05
8.0.160.0040.00417.07
8.0.150.0040.00417.06
8.0.140.0040.00416.97
8.0.130.0060.00013.51
8.0.120.0050.00317.07
8.0.110.0000.00717.02
8.0.100.0070.00016.82
8.0.90.0040.00416.97
8.0.80.0070.01317.01
8.0.70.0140.00616.96
8.0.60.0060.01316.90
8.0.50.0090.00916.92
8.0.30.0060.00917.07
8.0.20.0060.00917.09
8.0.10.0130.00717.04
8.0.00.0050.01017.23
7.4.330.0000.00515.55
7.4.320.0000.00816.74
7.4.300.0050.00316.73
7.4.290.0030.00316.65
7.4.280.0070.00016.71
7.4.270.0000.00716.73
7.4.260.0000.00513.52
7.4.250.0000.00716.69
7.4.240.0020.00616.82
7.4.230.0050.00216.61
7.4.220.0070.00016.84
7.4.210.0090.00916.82
7.4.200.0100.00316.90
7.4.190.0080.00616.81
7.4.180.0140.00416.70
7.4.160.0110.00416.76
7.4.150.0090.00616.81
7.4.140.0030.01016.76
7.4.130.0070.00716.72
7.4.120.0070.00716.79
7.4.110.0110.00816.90
7.4.100.0110.00416.77
7.4.90.0080.00716.82
7.4.80.0080.00516.59
7.4.70.0110.00316.76
7.4.60.0100.00516.93
7.4.50.0070.00716.63
7.4.40.0100.00316.70
7.4.30.0070.00716.77
7.4.20.0040.01116.60
7.4.10.0030.01416.66
7.4.00.0060.01016.69
7.3.330.0040.00416.18
7.3.320.0000.00613.08
7.3.310.0040.00416.50
7.3.300.0000.00716.30
7.3.290.0000.01416.36
7.3.280.0140.00316.36
7.3.270.0080.01216.35
7.3.260.0120.00316.44
7.3.250.0060.00916.46
7.3.240.0120.00316.39
7.3.230.0040.01116.39
7.3.220.0060.00916.29
7.3.210.0120.00616.32
7.3.200.0030.01016.34
7.3.190.0070.00716.29
7.3.180.0040.01016.34
7.3.170.0100.00416.36
7.3.160.0060.01316.36
7.3.150.0070.00716.35
7.3.140.0100.00316.36
7.3.130.0070.00716.26
7.3.120.0000.01416.41
7.3.110.0060.01216.23
7.3.100.0090.00916.22
7.3.90.0080.00916.70
7.3.80.0120.00616.30
7.3.70.0160.00316.57
7.3.60.0000.01816.50
7.3.50.0070.00716.63
7.3.40.0070.01116.50
7.3.30.0110.00716.56
7.3.20.0110.00416.50
7.3.10.0090.00616.54
7.3.00.0130.00616.37

preferences:
35.33 ms | 403 KiB | 5 Q