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[0];

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.0150.00018.30
8.3.50.0000.01416.65
8.3.40.0170.00318.80
8.3.30.0110.00318.81
8.3.20.0040.00420.26
8.3.10.0060.00321.71
8.3.00.0080.00019.69
8.2.180.0110.01118.43
8.2.170.0140.00422.96
8.2.160.0120.00919.24
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00019.21
8.2.120.0040.00426.35
8.2.110.0000.00920.52
8.2.100.0040.00717.82
8.2.90.0040.00419.17
8.2.80.0080.00017.97
8.2.70.0000.00817.88
8.2.60.0030.00618.03
8.2.50.0030.00518.10
8.2.40.0000.00820.36
8.2.30.0080.00019.22
8.2.20.0000.00718.25
8.2.10.0040.00418.00
8.2.00.0000.00718.13
8.1.280.0060.00925.92
8.1.270.0070.00022.19
8.1.260.0080.00026.35
8.1.250.0060.00328.09
8.1.240.0080.00022.73
8.1.230.0000.01117.66
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0000.01317.35
8.1.190.0040.00417.13
8.1.180.0000.00918.10
8.1.170.0030.00518.37
8.1.160.0000.00719.05
8.1.150.0040.00418.84
8.1.140.0000.00719.64
8.1.130.0030.00318.85
8.1.120.0030.00517.57
8.1.110.0000.00817.43
8.1.100.0040.00417.43
8.1.90.0000.00717.54
8.1.80.0000.00717.56
8.1.70.0000.00817.60
8.1.60.0050.00217.64
8.1.50.0000.00817.71
8.1.40.0040.00417.63
8.1.30.0030.00517.77
8.1.20.0040.00417.73
8.1.10.0040.00417.77
8.1.00.0040.00417.55
8.0.300.0070.00018.77
8.0.290.0050.00316.75
8.0.280.0030.00318.57
8.0.270.0030.00517.24
8.0.260.0060.00017.02
8.0.250.0040.00417.00
8.0.240.0100.00017.09
8.0.230.0030.00317.04
8.0.220.0030.00516.85
8.0.210.0050.00217.00
8.0.200.0000.00617.04
8.0.190.0040.00417.06
8.0.180.0040.00417.00
8.0.170.0070.00016.86
8.0.160.0030.00616.97
8.0.150.0030.00516.98
8.0.140.0070.00016.83
8.0.130.0060.00013.39
8.0.120.0060.00316.83
8.0.110.0040.00416.88
8.0.100.0000.00817.08
8.0.90.0000.00716.84
8.0.80.0090.01317.02
8.0.70.0030.00517.04
8.0.60.0000.00716.85
8.0.50.0000.00716.94
8.0.30.0070.01217.27
8.0.20.0120.00617.41
8.0.10.0070.00016.95
8.0.00.0090.00916.58
7.4.330.0020.00215.55
7.4.320.0060.00016.69
7.4.300.0000.00616.77
7.4.290.0040.00416.72
7.4.280.0040.00416.69
7.4.270.0030.00516.74
7.4.260.0040.00416.80
7.4.250.0000.00716.73
7.4.240.0050.00216.73
7.4.230.0030.00516.84
7.4.220.0100.01016.77
7.4.210.0100.01016.93
7.4.200.0030.00316.84
7.4.160.0080.00916.71
7.4.150.0030.01717.40
7.4.140.0110.00717.86
7.4.130.0150.00316.72
7.4.120.0080.01216.72
7.4.110.0100.00716.59
7.4.100.0160.00716.56
7.4.90.0100.01016.80
7.4.80.0080.00819.39
7.4.70.0060.01216.78
7.4.60.0090.00616.42
7.4.50.0100.00716.39
7.4.40.0030.01916.69
7.4.30.0100.01316.49
7.4.00.0090.00915.11
7.3.330.0050.00013.33
7.3.320.0030.00313.47
7.3.310.0000.00716.46
7.3.300.0000.00616.37
7.3.290.0040.01016.40
7.3.280.0090.00816.38
7.3.270.0030.01417.40
7.3.260.0130.00716.53
7.3.250.0100.01116.68
7.3.240.0150.00516.72
7.3.230.0100.00616.78
7.3.210.0060.01016.62
7.3.200.0090.01016.71
7.3.190.0140.00316.72
7.3.180.0070.01016.52
7.3.170.0060.00916.78
7.3.160.0090.00916.47
7.3.120.0070.01115.25
7.3.110.0090.00914.92
7.3.100.0110.00414.79
7.3.90.0030.00914.96
7.3.80.0080.00815.14
7.3.70.0140.00315.06
7.3.60.0040.01115.02
7.3.50.0130.00315.05
7.3.40.0070.00714.61
7.3.30.0070.00714.84
7.3.20.0060.00816.73
7.3.10.0050.00816.81
7.3.00.0070.00316.68
7.2.330.0080.01116.96
7.2.320.0120.00617.03
7.2.310.0120.00616.84
7.2.300.0030.01316.79
7.2.290.0060.01616.94
7.2.250.0060.01315.27
7.2.240.0100.01014.86
7.2.230.0000.01515.11
7.2.220.0060.00915.30
7.2.210.0070.00715.05
7.2.200.0000.00915.20
7.2.190.0080.00514.98
7.2.180.0030.00715.16
7.2.170.0080.00415.04
7.2.130.0070.00517.03
7.2.120.0050.00916.90
7.2.110.0000.01317.08
7.2.100.0030.01116.91
7.2.90.0040.00516.95
7.2.80.0070.00816.79
7.2.70.0080.00516.90
7.2.60.0110.00916.95
7.2.50.0030.00817.05
7.2.40.0090.00717.04
7.2.30.0030.00817.00
7.2.20.0070.00717.02
7.2.10.0070.00517.07
7.2.00.0000.01417.82
7.1.330.0060.00615.75
7.1.320.0030.00615.94
7.1.310.0070.00715.72
7.1.300.0040.00415.86
7.1.290.0130.00015.87
7.1.280.0070.00316.08
7.1.270.0060.01016.04
7.1.260.0070.00715.95
7.1.250.0020.01215.81
7.1.200.0000.00915.87
7.1.100.0000.01118.58
7.1.70.0060.01117.25
7.1.60.0190.01635.30
7.1.50.0160.01934.76
7.1.40.0190.01634.69
7.1.30.0210.01434.66
7.1.20.0300.00734.90
7.1.10.0060.01116.81
7.1.00.0100.00716.98
7.0.200.0070.01016.80
7.0.190.0000.01617.07
7.0.180.0000.01716.42
7.0.170.0060.01216.27
7.0.160.0030.01416.34
7.0.150.0070.01016.38
7.0.140.0080.01016.55
7.0.130.0080.00816.63
7.0.120.0090.00916.93
7.0.110.0070.01016.66
7.0.100.0000.01616.52
7.0.90.0040.01316.54
7.0.80.0110.00616.59
7.0.70.0060.01016.35
7.0.60.0030.01316.45
7.0.50.0080.00816.49
7.0.40.0140.00516.63
7.0.30.0090.01316.58
7.0.20.0060.01116.56
7.0.10.0080.00816.50
7.0.00.0060.01116.52

preferences:
45.62 ms | 401 KiB | 5 Q