3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_numerics ($str) { preg_match('/^mom_(\d+)$/', $str, $matches); if (defined($matches[1])) return $matches[1] . "<br />"; else return "Not found <br />"; } $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.40.0120.00318.97
8.3.30.0100.01018.80
8.3.20.0080.00020.29
8.3.10.0000.00821.90
8.3.00.0000.01018.00
8.2.170.0110.00422.96
8.2.160.0070.01320.44
8.2.150.0080.00024.18
8.2.140.0070.00024.66
8.2.130.0050.00321.23
8.2.120.0040.00426.35
8.2.110.0030.00722.32
8.2.100.0080.00418.09
8.2.90.0030.00518.09
8.2.80.0040.00417.97
8.2.70.0030.00617.88
8.2.60.0040.00418.05
8.2.50.0060.00318.10
8.2.40.0050.00220.48
8.2.30.0040.00421.06
8.2.20.0040.00418.04
8.2.10.0050.00317.95
8.2.00.0000.00717.92
8.1.270.0150.00023.99
8.1.260.0000.00826.35
8.1.250.0000.00728.09
8.1.240.0060.00322.20
8.1.230.0060.00621.04
8.1.220.0000.00817.74
8.1.210.0090.00018.77
8.1.200.0000.01017.35
8.1.190.0040.00417.35
8.1.180.0000.00818.10
8.1.170.0060.00320.42
8.1.160.0000.00719.13
8.1.150.0000.00720.75
8.1.140.0000.00819.48
8.1.130.0000.00718.72
8.1.120.0000.00717.61
8.1.110.0030.00517.47
8.1.100.0060.00317.64
8.1.90.0030.00617.43
8.1.80.0040.00417.46
8.1.70.0000.00717.43
8.1.60.0030.00517.64
8.1.50.0040.00417.68
8.1.40.0030.00617.71
8.1.30.0040.00417.72
8.1.20.0000.00817.86
8.1.10.0040.00417.66
8.1.00.0040.00417.68
8.0.300.0000.00820.01
8.0.290.0040.00417.00
8.0.280.0040.00418.34
8.0.270.0000.00717.24
8.0.260.0000.00717.05
8.0.250.0030.00317.12
8.0.240.0070.00017.15
8.0.230.0030.00317.13
8.0.220.0050.00217.08
8.0.210.0080.00017.07
8.0.200.0030.00317.01
8.0.190.0000.00917.10
8.0.180.0000.00817.10
8.0.170.0000.00716.99
8.0.160.0040.00417.07
8.0.150.0040.00417.05
8.0.140.0040.00416.90
8.0.130.0050.00013.46
8.0.120.0070.00017.03
8.0.110.0050.00316.89
8.0.100.0000.00717.09
8.0.90.0040.00416.95
8.0.80.0090.00617.08
8.0.70.0000.00816.91
8.0.60.0040.00417.11
8.0.50.0040.00416.84
8.0.30.0080.01217.33
8.0.20.0140.00517.40
8.0.10.0070.00017.18
8.0.00.0170.00317.10
7.4.330.0030.00315.55
7.4.320.0030.00316.77
7.4.300.0030.00316.65
7.4.290.0000.00816.84
7.4.280.0000.00916.73
7.4.270.0070.00016.74
7.4.260.0000.00513.40
7.4.250.0070.00216.69
7.4.240.0040.00416.83
7.4.230.0070.00016.82
7.4.220.0160.00916.65
7.4.210.0050.01316.85
7.4.200.0040.00416.63
7.4.160.0100.00616.78
7.4.150.0150.00317.40
7.4.140.0090.01017.86
7.4.130.0090.00916.56
7.4.120.0150.00716.75
7.4.110.0080.00916.84
7.4.100.0070.01016.75
7.4.90.0060.01116.76
7.4.80.0080.01119.39
7.4.70.0060.01016.53
7.4.60.0030.01316.73
7.4.50.0040.01516.60
7.4.40.0100.00716.65
7.4.30.0000.02316.67
7.4.00.0110.00615.33
7.3.330.0000.00513.36
7.3.320.0030.00213.52
7.3.310.0040.00416.54
7.3.300.0070.00016.58
7.3.290.0000.00716.32
7.3.280.0100.00916.45
7.3.270.0120.00617.40
7.3.260.0100.01016.44
7.3.250.0130.00516.44
7.3.240.0080.00816.49
7.3.230.0130.00516.80
7.3.210.0140.01016.67
7.3.200.0110.01116.57
7.3.190.0180.00316.58
7.3.180.0100.01016.54
7.3.170.0030.01216.59
7.3.160.0030.01616.63
7.3.120.0100.01014.80
7.3.110.0030.01415.13
7.3.100.0060.00915.24
7.3.90.0030.00614.92
7.3.80.0070.01114.98
7.3.70.0070.01114.74
7.3.60.0080.00815.02
7.3.50.0040.00715.00
7.3.40.0110.00315.12
7.3.30.0100.00315.02
7.3.20.0000.01516.59
7.3.10.0090.00516.78
7.3.00.0060.00516.51
7.2.330.0090.00916.76
7.2.320.0080.00816.73
7.2.310.0130.00716.52
7.2.300.0080.00816.76
7.2.290.0000.01716.85
7.2.250.0040.01814.91
7.2.240.0070.01315.07
7.2.230.0170.00015.02
7.2.220.0070.01015.04
7.2.210.0030.01215.06
7.2.200.0060.00614.93
7.2.190.0070.01014.91
7.2.180.0140.00315.30
7.2.170.0070.00415.03
7.2.130.0000.00816.96
7.2.120.0030.00616.68
7.2.110.0030.00916.57
7.2.100.0000.00817.00
7.2.90.0030.01016.93
7.2.80.0090.00317.00
7.2.70.0000.01317.13
7.2.60.0070.00416.75
7.2.50.0070.00716.91
7.2.40.0080.00616.95
7.2.30.0100.00717.20
7.2.20.0000.01416.91
7.2.10.0070.00716.70
7.2.00.0050.00517.95
7.1.330.0060.00915.93
7.1.320.0000.00916.18
7.1.310.0140.00016.26
7.1.300.0030.01016.08
7.1.290.0070.00715.62
7.1.280.0100.00315.82
7.1.270.0080.00815.64
7.1.260.0040.00716.00
7.1.250.0110.00016.04
7.1.200.0200.00315.93
7.1.100.0060.00618.42
7.1.70.0070.00717.46
7.1.60.0210.00635.30
7.1.50.0190.00835.19
7.1.40.0160.02034.76
7.1.30.0190.00934.74
7.1.20.0180.01135.05
7.1.10.0080.00516.85
7.1.00.0070.00716.96
7.0.200.0070.00716.58
7.0.190.0060.00617.07
7.0.180.0080.00616.43
7.0.170.0040.01116.12
7.0.160.0090.00316.38
7.0.150.0050.00816.40
7.0.140.0030.01016.53
7.0.130.0030.01016.80
7.0.120.0070.00716.69
7.0.110.0140.00016.54
7.0.100.0140.00016.53
7.0.90.0000.01616.42
7.0.80.0060.00616.38
7.0.70.0090.00616.57
7.0.60.0000.01916.21
7.0.50.0070.00716.63
7.0.40.0070.00716.36
7.0.30.0060.01016.50
7.0.20.0100.00616.69
7.0.10.0040.01116.72
7.0.00.0030.01016.46

preferences:
46.25 ms | 400 KiB | 5 Q