3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_numerics ($str) { preg_match_all('/\d+/', $str, $matches); return $matches[0]; } $one = 'foo bar 4 baz (5 qux quux)'; $two = 'bar baz 2 bar'; $three = 'qux bar 12 quux (3 foo)'; $four = 'foo baz 3 bar (13 quux foo)'; $test = get_numerics($one); echo $test[1];

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.0160.00718.55
8.3.50.0100.00716.32
8.3.40.0130.00718.82
8.3.30.0140.00018.98
8.3.20.0050.00220.13
8.3.10.0030.00722.08
8.3.00.0040.00419.69
8.2.180.0090.00917.13
8.2.170.0120.00622.96
8.2.160.0070.00719.27
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0080.00019.27
8.2.120.0090.00026.35
8.2.110.0040.00421.00
8.2.100.0080.00417.82
8.2.90.0000.00819.17
8.2.80.0060.00318.03
8.2.70.0000.00917.75
8.2.60.0000.00917.93
8.2.50.0000.00918.10
8.2.40.0040.00420.55
8.2.30.0040.00419.30
8.2.20.0070.00018.15
8.2.10.0000.00718.14
8.2.00.0040.00418.07
8.1.280.0120.00325.92
8.1.270.0040.00422.19
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00317.83
8.1.230.0110.00017.95
8.1.220.0040.00417.78
8.1.210.0000.00918.77
8.1.200.0040.00717.48
8.1.190.0000.00817.35
8.1.180.0030.00518.10
8.1.170.0000.00818.37
8.1.160.0000.00719.10
8.1.150.0040.00418.71
8.1.140.0050.00319.48
8.1.130.0000.00818.86
8.1.120.0050.00217.59
8.1.110.0040.00417.54
8.1.100.0080.00017.48
8.1.90.0070.00017.56
8.1.80.0000.00717.42
8.1.70.0070.00017.54
8.1.60.0040.00417.62
8.1.50.0040.00417.67
8.1.40.0040.00417.53
8.1.30.0060.00317.82
8.1.20.0040.00417.81
8.1.10.0030.00517.70
8.1.00.0080.00017.64
8.0.300.0040.00418.77
8.0.290.0040.00416.88
8.0.280.0030.00318.37
8.0.270.0050.00317.27
8.0.260.0000.00816.88
8.0.250.0070.00017.00
8.0.240.0040.00417.12
8.0.230.0000.00716.95
8.0.220.0000.00716.86
8.0.210.0000.00716.93
8.0.200.0000.00717.04
8.0.190.0080.00017.01
8.0.180.0030.00317.05
8.0.170.0040.00416.91
8.0.160.0030.00617.04
8.0.150.0040.00416.98
8.0.140.0020.00516.80
8.0.130.0000.00813.39
8.0.120.0000.00816.98
8.0.110.0000.00717.02
8.0.100.0030.00516.81
8.0.90.0080.00017.03
8.0.80.0060.01316.93
8.0.70.0040.00416.91
8.0.60.0070.00017.09
8.0.50.0000.00716.98
8.0.30.0110.00917.19
8.0.20.0090.01017.41
8.0.10.0000.00817.11
8.0.00.0120.00616.77
7.4.330.0020.00215.55
7.4.320.0000.00616.59
7.4.300.0000.00716.77
7.4.290.0050.00216.76
7.4.280.0040.00416.70
7.4.270.0040.00316.77
7.4.260.0000.00716.72
7.4.250.0000.00716.77
7.4.240.0000.00816.67
7.4.230.0030.00316.74
7.4.220.0070.01316.83
7.4.210.0040.01116.75
7.4.200.0000.00716.84
7.4.160.0060.01316.78
7.4.150.0110.00717.40
7.4.140.0090.00917.86
7.4.130.0140.01016.47
7.4.120.0070.01316.70
7.4.110.0110.00716.41
7.4.100.0160.00316.70
7.4.90.0060.01316.54
7.4.80.0060.00919.39
7.4.70.0070.01016.50
7.4.60.0030.01316.64
7.4.50.0070.00716.53
7.4.40.0070.01316.81
7.4.30.0160.00316.81
7.4.00.0070.01015.14
7.3.330.0030.00313.21
7.3.320.0050.00013.45
7.3.310.0000.00816.50
7.3.300.0000.00716.52
7.3.290.0060.00916.40
7.3.280.0070.00916.37
7.3.270.0090.00917.40
7.3.260.0080.01016.56
7.3.250.0100.00616.50
7.3.240.0090.01116.39
7.3.230.0100.00716.64
7.3.210.0170.00016.43
7.3.200.0040.01116.52
7.3.190.0030.01316.66
7.3.180.0060.00916.46
7.3.170.0100.00616.53
7.3.160.0070.01116.52
7.3.10.0070.00316.74
7.3.00.0090.00016.48
7.2.330.0080.00916.77
7.2.320.0170.00316.96
7.2.310.0170.00016.79
7.2.300.0030.01416.46
7.2.290.0040.01516.88
7.2.130.0030.01016.96
7.2.120.0090.00616.88
7.2.110.0030.01016.97
7.2.100.0110.00417.11
7.2.90.0000.01217.34
7.2.80.0080.00516.90
7.2.70.0080.00316.69
7.2.60.0160.00617.18
7.2.50.0120.00417.16
7.2.40.0150.00416.91
7.2.30.0000.01017.11
7.2.20.0040.00817.17
7.2.10.0000.01017.14
7.2.00.0060.00618.44
7.1.250.0000.00916.09
7.1.200.0000.01316.00
7.1.100.0040.00718.52
7.1.70.0030.01317.28
7.1.60.0220.01235.25
7.1.50.0840.00935.11
7.1.40.0130.01334.74
7.1.30.0550.02234.67
7.1.20.0640.00332.80
7.1.10.0060.00916.73
7.1.00.0060.01216.94
7.0.200.0640.00616.83
7.0.190.0090.01016.68
7.0.180.0080.00616.27
7.0.170.0060.01016.30
7.0.160.0030.01416.38
7.0.150.0070.01016.59
7.0.140.0460.01014.82
7.0.130.0040.01416.71
7.0.120.0030.01416.79
7.0.110.0030.01616.57
7.0.100.0510.01514.75
7.0.90.0450.01514.62
7.0.80.0000.01716.39
7.0.70.0060.01216.45
7.0.60.0000.01816.47
7.0.50.0730.01214.92
7.0.40.0050.01716.43
7.0.30.0070.00816.63
7.0.20.0060.01216.65
7.0.10.0730.01016.48
7.0.00.0030.01316.48

preferences:
49.63 ms | 400 KiB | 5 Q