3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_numerics ($str) { preg_match( '/(?<=\bLevel\s)(?:[\w-]+)/is', $str, $matches); return $matches; } $one = 'aasdjhgasd asgdahjsd hjg 4ht ahsjdhkajsdhakjsdh Level 1, 100 XP Unlocked 3 Jul'; $string = "This is a string, keyword next, some more text. keyword next-word. keyword another_word. Okay, keyword do-rae-mi-fa_so_la."; print_r(get_numerics($one)); print_r(get_numerics($string));

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.0110.01116.48
8.3.50.0150.00622.14
8.3.40.0140.00718.92
8.3.30.0040.01118.71
8.3.20.0090.00318.76
8.3.10.0050.00323.70
8.3.00.0040.00721.68
8.2.180.0100.01016.75
8.2.170.0070.00722.96
8.2.160.0160.00322.04
8.2.150.0080.00024.18
8.2.140.0000.00724.66
8.2.130.0070.00019.76
8.2.120.0040.00426.35
8.2.110.0130.00321.04
8.2.100.0040.00717.84
8.2.90.0080.00018.89
8.2.80.0000.00817.97
8.2.70.0000.01017.63
8.2.60.0040.00417.93
8.2.50.0060.00318.10
8.2.40.0040.00420.78
8.2.30.0040.00419.25
8.2.20.0040.00418.08
8.2.10.0040.00418.00
8.2.00.0000.00717.64
8.1.280.0030.01725.92
8.1.270.0080.00022.27
8.1.260.0000.00728.09
8.1.250.0040.00428.09
8.1.240.0030.00622.69
8.1.230.0070.00420.30
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0050.00517.25
8.1.190.0040.00417.36
8.1.180.0080.00018.10
8.1.170.0000.00818.67
8.1.160.0040.00422.17
8.1.150.0040.00418.88
8.1.140.0000.00719.52
8.1.130.0000.00717.54
8.1.120.0000.00717.60
8.1.110.0040.00417.53
8.1.100.0040.00417.55
8.1.90.0000.00717.49
8.1.80.0000.00717.54
8.1.70.0070.00017.56
8.1.60.0000.00917.73
8.1.50.0030.00617.59
8.1.40.0040.00817.67
8.1.30.0060.00317.81
8.1.20.0060.00317.74
8.1.10.0040.00417.57
8.1.00.0000.00817.48
8.0.300.0040.00418.77
8.0.290.0030.00616.75
8.0.280.0030.00318.34
8.0.270.0040.00417.21
8.0.260.0000.00617.27
8.0.250.0030.00317.04
8.0.240.0030.00316.91
8.0.230.0000.00816.93
8.0.220.0000.00716.96
8.0.210.0000.00717.01
8.0.200.0000.00616.99
8.0.190.0050.00317.04
8.0.180.0030.00516.92
8.0.170.0040.00416.90
8.0.160.0070.00017.08
8.0.150.0000.00716.97
8.0.140.0040.00417.00
8.0.130.0050.00313.37
8.0.120.0040.00416.81
8.0.110.0050.00316.96
8.0.100.0050.00316.79
8.0.90.0000.00716.92
8.0.80.0100.00716.97
8.0.70.0050.00316.77
8.0.60.0000.00816.86
8.0.50.0000.00717.04
8.0.30.0100.00917.23
8.0.20.0080.01417.40
8.0.10.0070.00016.94
8.0.00.0070.01316.74
7.4.330.0000.00515.55
7.4.320.0000.00716.64
7.4.300.0030.00316.78
7.4.290.0040.00416.81
7.4.280.0000.00816.59
7.4.270.0030.00316.80
7.4.260.0070.00016.68
7.4.250.0040.00416.78
7.4.240.0050.00216.74
7.4.230.0000.00716.55
7.4.220.0070.01416.66
7.4.210.0060.01216.87
7.4.200.0070.00016.64
7.4.160.0100.00516.72
7.4.150.0100.00717.40
7.4.140.0090.00917.86
7.4.130.0070.01316.60
7.4.120.0110.00516.68
7.4.110.0090.00916.84
7.4.100.0180.00616.51
7.4.90.0140.00416.81
7.4.80.0120.00419.39
7.4.70.0120.00416.50
7.4.60.0060.01316.59
7.4.50.0070.00316.85
7.4.40.0070.01016.43
7.4.30.0110.00516.66
7.4.00.0120.00315.03
7.3.330.0060.00013.24
7.3.320.0000.00513.33
7.3.310.0080.00016.44
7.3.300.0040.00416.26
7.3.290.0060.01016.38
7.3.280.0080.00916.37
7.3.270.0070.01017.40
7.3.260.0090.01216.37
7.3.250.0050.01216.50
7.3.240.0080.00916.63
7.3.230.0080.01416.64
7.3.210.0080.00816.48
7.3.200.0100.00716.39
7.3.190.0060.01016.32
7.3.180.0140.00416.55
7.3.170.0110.00716.36
7.3.160.0160.00616.59
7.3.10.0100.01016.74
7.3.00.0110.00316.68
7.2.330.0150.00316.77
7.2.320.0070.01016.72
7.2.310.0070.01016.37
7.2.300.0090.01316.75
7.2.290.0120.00916.58
7.2.130.0180.00716.92
7.2.120.0110.01117.02
7.2.110.0110.01116.96
7.2.100.0110.01116.95
7.2.90.0150.00717.05
7.2.80.0180.00617.01
7.2.70.0200.00416.79
7.2.60.0200.00316.79
7.2.50.0070.01016.89
7.2.40.0090.00216.75
7.2.30.0120.00616.92
7.2.20.0080.00816.91
7.2.10.0130.00716.88
7.2.00.0020.01018.23
7.1.250.0080.01215.84
7.1.70.0040.01117.52
7.1.60.0040.00717.32
7.1.00.0100.07022.32
7.0.200.0650.00314.72
7.0.120.0170.06322.02
7.0.110.0130.06322.00
7.0.100.0130.05722.02
7.0.90.0100.06721.97
7.0.80.0200.05022.13
7.0.70.0070.06021.97
7.0.60.0200.05722.13
7.0.50.0070.06322.11
7.0.40.0270.04322.11
7.0.30.0170.05022.07
7.0.20.0070.06722.04
7.0.10.0300.06322.11
7.0.00.0130.05322.11
5.6.270.0070.06720.89
5.6.260.0170.05720.79
5.6.250.0170.06720.89
5.6.240.0170.05721.07
5.6.230.0070.08321.02
5.6.220.0200.04721.04
5.6.210.0030.08020.95
5.6.200.0070.06320.85
5.6.190.0070.07020.93
5.6.180.0100.05721.02
5.6.170.0130.05320.85
5.6.160.0100.06320.75
5.6.150.0170.05321.06
5.6.140.0270.06020.82
5.6.130.0130.06021.01
5.6.120.0200.05721.05
5.6.110.0170.05720.79
5.6.100.0230.04720.82
5.6.90.0170.06720.90
5.6.80.0130.06320.45
5.6.70.0170.05320.20
5.6.60.0170.05320.41
5.6.50.0130.05020.37
5.6.40.0070.06320.19
5.6.30.0100.06020.45
5.6.20.0130.05320.15
5.6.10.0130.05020.39
5.6.00.0130.05320.34

preferences:
34.47 ms | 401 KiB | 5 Q