3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_numerics ($str) { preg_match('/^mom_\d+/', $str, $matches); return $matches[0]; } $one = 'mom_5'; $two = 'mom_123'; $three = 'actions'; print_r(get_numerics($one)); print_r(get_numerics($two)); print_r(get_numerics($three));

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.00416.88
8.3.50.0160.00016.57
8.3.40.0090.00618.96
8.3.30.0130.00718.98
8.3.20.0050.00220.34
8.3.10.0040.00421.96
8.3.00.0050.00517.84
8.2.180.0070.01018.48
8.2.170.0000.01422.96
8.2.160.0110.00720.46
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0040.00421.12
8.2.110.0060.00321.11
8.2.100.0080.00418.14
8.2.90.0000.00819.39
8.2.80.0090.00017.97
8.2.70.0000.00817.68
8.2.60.0060.00318.22
8.2.50.0040.00418.10
8.2.40.0000.00720.59
8.2.30.0000.00921.16
8.2.20.0020.00518.05
8.2.10.0050.00318.05
8.2.00.0040.00418.09
8.1.280.0100.00725.92
8.1.270.0040.00422.03
8.1.260.0030.00626.35
8.1.250.0040.00428.09
8.1.240.0040.00422.10
8.1.230.0070.00319.08
8.1.220.0060.00317.74
8.1.210.0090.00318.77
8.1.200.0060.00317.25
8.1.190.0040.00417.35
8.1.180.0000.00918.10
8.1.170.0030.00620.36
8.1.160.0040.00419.05
8.1.150.0040.00420.68
8.1.140.0040.00419.54
8.1.130.0070.00018.79
8.1.120.0050.00317.48
8.1.110.0050.00317.61
8.1.100.0080.00017.45
8.1.90.0050.00517.45
8.1.80.0040.00417.60
8.1.70.0040.00417.54
8.1.60.0000.00817.63
8.1.50.0030.00617.64
8.1.40.0040.00417.70
8.1.30.0030.00517.78
8.1.20.0040.00417.81
8.1.10.0030.00517.75
8.1.00.0040.00417.64
8.0.300.0000.00721.61
8.0.290.0040.00416.88
8.0.280.0000.00718.37
8.0.270.0070.00017.22
8.0.260.0030.00316.97
8.0.250.0030.00316.99
8.0.240.0070.00017.13
8.0.230.0000.00817.13
8.0.220.0000.00717.07
8.0.210.0040.00417.01
8.0.200.0030.00317.07
8.0.190.0000.00916.95
8.0.180.0000.00717.11
8.0.170.0070.00017.11
8.0.160.0000.00816.92
8.0.150.0030.00316.97
8.0.140.0000.00717.01
8.0.130.0000.00513.52
8.0.120.0070.00017.01
8.0.110.0040.00417.10
8.0.100.0000.00716.87
8.0.90.0000.00716.93
8.0.80.0070.01017.03
8.0.70.0000.00716.91
8.0.60.0000.00816.85
8.0.50.0070.00016.94
8.0.30.0090.00717.09
8.0.20.0080.01117.43
8.0.10.0050.00317.26
8.0.00.0070.01316.95
7.4.330.0000.00615.55
7.4.320.0070.00016.66
7.4.300.0020.00516.73
7.4.290.0030.00716.73
7.4.280.0070.00016.73
7.4.270.0040.00416.75
7.4.260.0000.00513.47
7.4.250.0000.00716.81
7.4.240.0040.00416.80
7.4.230.0000.00816.80
7.4.220.0160.01016.70
7.4.210.0070.00816.77
7.4.200.0030.00316.72
7.4.160.0110.00416.74
7.4.150.0130.01017.40
7.4.140.0060.01117.86
7.4.130.0110.00616.90
7.4.120.0120.00716.68
7.4.110.0130.00616.70
7.4.100.0030.01416.79
7.4.90.0060.01216.87
7.4.80.0030.01319.39
7.4.70.0040.01616.80
7.4.60.0030.01316.68
7.4.50.0090.00616.70
7.4.40.0090.00916.80
7.4.30.0120.00416.74
7.4.00.0040.01315.13
7.3.330.0000.00513.49
7.3.320.0060.00013.52
7.3.310.0040.00416.51
7.3.300.0030.00316.39
7.3.290.0030.00316.41
7.3.280.0070.01116.44
7.3.270.0090.00817.40
7.3.260.0110.00516.63
7.3.250.0130.00616.56
7.3.240.0110.01016.50
7.3.230.0140.00316.66
7.3.210.0030.01416.52
7.3.200.0110.00916.83
7.3.190.0100.00816.65
7.3.180.0140.00316.80
7.3.170.0130.00316.40
7.3.160.0110.00616.40
7.3.120.0040.01014.93
7.3.110.0060.00814.99
7.3.100.0070.00815.21
7.3.90.0110.00515.06
7.3.80.0070.00515.05
7.3.70.0050.00614.95
7.3.60.0050.00714.95
7.3.50.0050.01014.81
7.3.40.0030.01415.03
7.3.30.0060.00814.83
7.3.20.0110.00516.75
7.3.10.0050.01016.81
7.3.00.0080.00316.72
7.2.330.0080.01116.84
7.2.320.0120.00416.59
7.2.310.0060.01016.49
7.2.300.0100.00616.66
7.2.290.0090.00616.52
7.2.250.0070.00714.94
7.2.240.0100.00415.16
7.2.230.0110.00515.07
7.2.220.0090.00415.21
7.2.210.0050.00915.14
7.2.200.0030.01215.15
7.2.190.0060.00915.12
7.2.180.0040.01114.89
7.2.170.0060.00814.99
7.2.160.0030.00915.13
7.2.150.0090.00616.98
7.2.140.0060.00917.02
7.2.130.0100.00617.08
7.2.120.0090.00616.78
7.2.110.0000.01417.02
7.2.100.0110.00416.89
7.2.90.0030.01316.88
7.2.80.0060.00516.77
7.2.70.0090.00917.02
7.2.60.0060.01016.72
7.2.50.0030.01316.82
7.2.40.0060.00917.05
7.2.30.0000.01817.00
7.2.20.0040.00816.75
7.2.10.0100.00616.71
7.2.00.0110.00918.19
7.1.330.0080.00515.99
7.1.320.0040.00716.10
7.1.310.0090.00316.16
7.1.300.0070.00915.82
7.1.290.0030.00715.80
7.1.280.0020.01215.76
7.1.270.0090.00516.06
7.1.260.0050.00915.95
7.1.250.0000.01415.84
7.1.200.0000.00815.87
7.1.100.0000.01118.62
7.1.70.0000.01317.44
7.1.60.0190.00935.07
7.1.50.0290.00035.12
7.1.40.0200.00734.91
7.1.30.0190.00834.76
7.1.20.0170.01334.76
7.1.10.0040.01116.69
7.1.00.0070.00716.97
7.0.200.0030.01216.52
7.0.190.0100.00316.88
7.0.180.0090.00516.40
7.0.170.0060.00916.39
7.0.160.0070.00716.27
7.0.150.0060.00816.36
7.0.140.0040.01116.66
7.0.130.0030.01016.80
7.0.120.0030.01016.57
7.0.110.0090.00616.38
7.0.100.0030.01016.52
7.0.90.0060.00916.46
7.0.80.0060.00616.46
7.0.70.0070.00716.28
7.0.60.0030.01316.43
7.0.50.0000.01416.55
7.0.40.0030.01116.67
7.0.30.0060.00616.48
7.0.20.0100.00316.46
7.0.10.0000.01316.52
7.0.00.0080.00516.56

preferences:
51.53 ms | 401 KiB | 5 Q