3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'this-2 is test'; preg_match('/(?P<test>\w+)/', $string, $matches); // basic syntax var_dump($matches['test']); preg_match('/(?<test>.+)/', $string, $matches); // alternative var_dump($matches['test']); preg_match("/(?'test'.+)/", $string, $matches); // alternative var_dump($matches['test']);

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.75
8.3.50.0080.00618.28
8.3.40.0000.01518.83
8.3.30.0080.00818.88
8.3.20.0070.00021.88
8.3.10.0050.00321.86
8.3.00.0000.00820.55
8.2.180.0120.00618.91
8.2.170.0000.01519.08
8.2.160.0100.00722.96
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00718.03
8.2.110.0090.00421.24
8.2.100.0000.01120.54
8.2.90.0030.00619.76
8.2.80.0040.00419.20
8.2.70.0030.00618.05
8.2.60.0030.00518.22
8.2.50.0050.00318.10
8.2.40.0050.00319.24
8.2.30.0040.00419.15
8.2.20.0040.00419.75
8.2.10.0040.00419.27
8.2.00.0000.00719.08
8.1.280.0140.00325.92
8.1.270.0090.00022.45
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0040.00422.25
8.1.230.0040.00820.90
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0000.00917.48
8.1.180.0050.00318.10
8.1.170.0040.00420.84
8.1.160.0040.00419.07
8.1.150.0040.00418.91
8.1.140.0050.00320.34
8.1.130.0000.00720.14
8.1.120.0000.00817.51
8.1.110.0000.00717.45
8.1.100.0000.00717.59
8.1.90.0030.00317.55
8.1.80.0030.00717.52
8.1.70.0040.00417.45
8.1.60.0030.00517.52
8.1.50.0000.00817.57
8.1.40.0030.00517.59
8.1.30.0040.00417.78
8.1.20.0000.00817.63
8.1.10.0000.00717.79
8.1.00.0090.00017.63
8.0.300.0040.00419.72
8.0.290.0040.00416.75
8.0.280.0050.00218.40
8.0.270.0030.00317.13
8.0.260.0050.00320.03
8.0.250.0070.00016.93
8.0.240.0000.00717.02
8.0.230.0070.00016.99
8.0.220.0000.00716.87
8.0.210.0030.00316.94
8.0.200.0040.00417.04
8.0.190.0000.00816.98
8.0.180.0030.00616.91
8.0.170.0030.00616.88
8.0.160.0040.00416.82
8.0.150.0000.00716.99
8.0.140.0040.00416.97
8.0.130.0000.00613.37
8.0.120.0030.00516.84
8.0.110.0070.00016.93
8.0.100.0000.00816.78
8.0.90.0040.00416.85
8.0.80.0100.00516.94
8.0.70.0030.00517.04
8.0.60.0030.00616.87
8.0.50.0060.00316.79
8.0.30.0060.00916.99
8.0.20.0100.01017.12
8.0.10.0070.00016.92
8.0.00.0090.00916.71
7.4.330.0050.00015.55
7.4.320.0030.00316.77
7.4.300.0030.00316.63
7.4.290.0040.00416.64
7.4.280.0000.00816.64
7.4.270.0030.00316.57
7.4.260.0000.00513.44
7.4.250.0030.00316.71
7.4.240.0020.00516.73
7.4.230.0000.00716.78
7.4.220.0020.00516.60
7.4.210.0120.00516.79
7.4.200.0000.00716.82
7.4.130.0120.00616.61
7.4.120.0110.00716.76
7.4.110.0190.00616.61
7.4.100.0090.00916.60
7.4.90.0110.01016.64
7.4.80.0080.00819.39
7.4.70.0030.01316.58
7.4.60.0100.00716.64
7.4.50.0030.01016.30
7.4.40.0060.01216.59
7.4.00.0160.00015.13
7.3.330.0050.00216.19
7.3.320.0030.00313.28
7.3.310.0000.00716.31
7.3.300.0060.00016.37
7.3.290.0070.00716.35
7.3.280.0110.00616.44
7.3.260.0090.01016.48
7.3.240.0100.00816.40
7.3.230.0090.00916.43
7.3.210.0060.01116.55
7.3.200.0130.01316.24
7.3.190.0000.01516.86
7.3.180.0130.00316.55
7.3.170.0060.01016.46
7.3.160.0060.01016.44
7.3.100.0110.00414.59
7.3.90.0140.00014.91
7.3.80.0060.01214.99
7.3.70.0130.00414.91
7.3.60.0070.00714.93
7.3.50.0090.00614.79
7.3.40.0100.01014.75
7.3.30.0040.01114.86
7.3.20.0070.00715.09
7.3.10.0130.00315.10
7.3.00.0030.01415.05
7.2.330.0100.01316.52
7.2.320.0140.00716.82
7.2.310.0000.01716.64
7.2.300.0040.01816.64
7.2.290.0060.01116.43
7.2.230.0060.01214.84
7.2.220.0110.00415.25
7.2.210.0000.02114.75
7.2.200.0030.01215.05
7.2.190.0000.02015.02
7.2.180.0060.00915.04
7.2.170.0180.00315.14
7.2.160.0150.00015.13
7.2.150.0090.00615.11
7.2.140.0140.00715.20
7.2.130.0030.01315.18
7.2.120.0090.00614.80
7.2.110.0090.00615.12
7.2.100.0150.00614.99
7.2.90.0030.01315.27
7.2.80.0070.00715.10
7.2.70.0090.00915.25
7.2.60.0030.01215.02
7.2.50.0090.00615.21
7.2.40.0120.00315.26
7.2.30.0030.01215.07
7.2.20.0070.01015.21
7.2.10.0120.00815.11
7.2.00.0030.01315.16
7.1.320.0100.00514.35
7.1.310.0070.01413.93
7.1.300.0150.00014.00
7.1.290.0100.01014.30
7.1.280.0080.00514.18
7.1.270.0130.00014.08
7.1.260.0100.01014.19
7.1.250.0050.01013.88

preferences:
37.9 ms | 400 KiB | 5 Q