3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = [ 'file_name_here1.txt', 'some_other-file10.txt', 'file_name_1__123.txt', 'this_file_name_2__456.txt', ]; foreach ($tests as $test) { preg_match('/(.+?)(\d+)\.\w+$/', $test, $m); var_dump(array_slice($m, 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.5.00.0110.01220.20
8.4.150.0030.00014.05
8.4.140.0120.00917.47
8.4.130.0140.00617.91
8.4.120.0110.00822.39
8.4.110.0110.00620.89
8.4.100.0070.00317.77
8.4.90.0130.00717.72
8.4.80.0130.00722.48
8.4.70.0060.00217.88
8.4.60.0130.00818.39
8.4.50.0100.01017.82
8.4.40.0030.00617.73
8.4.30.0120.00618.93
8.4.20.0090.00019.66
8.4.10.0000.00819.61
8.3.280.0120.00918.62
8.3.270.0120.00716.55
8.3.260.0080.00616.76
8.3.250.0130.00718.93
8.3.240.0080.01116.76
8.3.230.0090.00916.77
8.3.220.0120.00617.26
8.3.210.0040.00416.64
8.3.200.0050.00416.77
8.3.190.0060.00217.13
8.3.180.0120.00816.74
8.3.170.0070.01118.98
8.3.160.0080.01116.62
8.3.150.0030.00517.13
8.3.140.0050.00317.41
8.3.130.0060.00616.57
8.3.120.0080.00018.86
8.3.110.0120.00316.76
8.3.100.0070.00316.64
8.3.90.0450.00426.77
8.3.80.0420.00626.77
8.3.70.0340.01126.77
8.3.60.0450.00326.77
8.3.50.0420.00826.77
8.3.40.0230.00926.77
8.3.30.0200.01226.77
8.3.20.0290.00426.77
8.3.10.0390.00726.77
8.3.00.0600.00626.77
8.2.290.0100.00920.20
8.2.280.0100.00918.45
8.2.270.0120.00616.99
8.2.260.0030.00616.60
8.2.250.0030.00618.50
8.2.240.0070.01418.95
8.2.230.0070.01020.94
8.2.220.0080.00024.06
8.2.210.0350.00426.77
8.2.200.0310.01026.77
8.2.190.0340.00326.77
8.2.180.0370.00026.77
8.2.170.0400.00026.77
8.2.160.0380.00726.77
8.2.150.0430.00326.77
8.2.140.0340.00726.77
8.2.130.0300.00726.77
8.2.120.0170.00326.77
8.2.110.0130.00726.77
8.2.100.0360.00426.77
8.2.90.0350.00426.77
8.2.80.0360.00726.77
8.2.70.0310.01226.77
8.2.60.0300.01326.77
8.2.50.0350.00926.77
8.2.40.0380.00426.77
8.2.30.0250.00826.77
8.2.20.0410.00426.77
8.2.10.0270.01526.77
8.2.00.0360.00426.77
8.1.330.0120.00816.97
8.1.320.0110.00816.76
8.1.310.0000.01116.15
8.1.300.0000.00916.23
8.1.290.0290.01326.77
8.1.280.0360.00726.77
8.1.270.0390.00626.77
8.1.260.0420.00826.77
8.1.250.0410.01426.77
8.1.240.0320.00926.77
8.1.230.0300.00926.77
8.1.220.0360.00326.77
8.1.210.0320.00726.77
8.1.200.0330.00526.77
8.1.190.0400.00026.77
8.1.180.0270.00826.77
8.1.170.0230.00926.77
8.1.160.0270.01226.77
8.1.150.0280.00726.77
8.1.140.0280.01026.77
8.1.130.0310.00826.77
8.1.120.0290.01026.77
8.1.110.0330.00626.77
8.1.100.0270.01226.77
8.1.90.0310.00726.77
8.1.80.0320.00426.77
8.1.70.0290.01026.77
8.1.60.0290.01326.77
8.1.50.0340.00826.77
8.1.40.0280.01126.77
8.1.30.0310.01026.77
8.1.20.0350.00726.77
8.1.10.0380.00326.77
8.1.00.0350.00726.77

preferences:
79.9 ms | 403 KiB | 5 Q