3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'this 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.0100.01018.21
8.3.50.0140.00018.42
8.3.40.0070.00718.97
8.3.30.0110.00418.78
8.3.20.0070.00021.77
8.3.10.0050.00322.00
8.3.00.0080.00020.58
8.2.180.0120.00618.41
8.2.170.0180.00418.83
8.2.160.0090.00622.96
8.2.150.0040.01124.18
8.2.140.0060.00324.66
8.2.130.0050.00226.16
8.2.120.0040.00426.16
8.2.110.0060.00322.34
8.2.100.0040.00820.54
8.2.90.0000.00919.70
8.2.80.0050.00319.32
8.2.70.0060.00318.01
8.2.60.0000.00818.22
8.2.50.0040.00418.10
8.2.40.0000.00819.23
8.2.30.0040.00419.28
8.2.20.0000.00718.01
8.2.10.0000.00719.20
8.2.00.0040.00419.27
8.1.280.0150.00325.92
8.1.270.0000.00822.46
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0060.00321.95
8.1.230.0000.01120.84
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0040.00417.35
8.1.190.0090.00017.36
8.1.180.0060.00318.10
8.1.170.0040.00420.60
8.1.160.0040.00419.01
8.1.150.0000.00718.85
8.1.140.0040.00422.14
8.1.130.0000.00720.09
8.1.120.0040.00417.59
8.1.110.0040.00417.56
8.1.100.0070.00017.46
8.1.90.0050.00317.57
8.1.80.0110.00017.51
8.1.70.0030.00317.42
8.1.60.0040.00417.55
8.1.50.0040.00417.46
8.1.40.0040.00417.61
8.1.30.0030.00617.73
8.1.20.0050.00217.70
8.1.10.0000.00817.67
8.1.00.0070.00417.63
8.0.300.0000.00719.67
8.0.290.0000.00916.75
8.0.280.0030.00518.41
8.0.270.0050.00217.21
8.0.260.0040.00419.99
8.0.250.0040.00416.93
8.0.240.0070.00016.93
8.0.230.0000.00717.04
8.0.220.0000.00716.98
8.0.210.0070.00016.89
8.0.200.0000.00717.10
8.0.190.0000.00817.00
8.0.180.0030.00616.93
8.0.170.0000.00916.91
8.0.160.0040.00416.91
8.0.150.0040.00416.90
8.0.140.0050.00316.83
8.0.130.0030.00313.41
8.0.120.0030.00516.79
8.0.110.0050.00216.89
8.0.100.0000.00816.82
8.0.90.0000.00916.94
8.0.80.0080.01416.92
8.0.70.0070.00016.91
8.0.60.0000.00717.04
8.0.50.0050.00316.92
8.0.30.0100.01317.33
8.0.20.0140.00617.33
8.0.10.0050.00317.09
8.0.00.0150.00816.76
7.4.330.0000.00615.55
7.4.320.0030.00316.73
7.4.300.0040.00416.75
7.4.290.0070.00016.74
7.4.280.0080.00016.56
7.4.270.0030.00316.57
7.4.260.0060.00013.39
7.4.250.0080.00016.72
7.4.240.0050.00216.77
7.4.230.0040.00416.75
7.4.220.0070.00016.71
7.4.210.0070.00916.75
7.4.200.0000.00716.82
7.4.130.0090.01516.48
7.4.120.0090.01516.55
7.4.110.0110.00716.71
7.4.100.0150.00416.74
7.4.90.0170.00016.57
7.4.80.0100.01319.39
7.4.70.0120.00616.80
7.4.60.0070.01116.64
7.4.50.0030.00716.48
7.4.40.0070.01016.55
7.4.10.0110.01114.75
7.4.00.0090.00615.08
7.3.330.0000.00716.44
7.3.320.0000.00513.26
7.3.310.0030.00316.38
7.3.300.0060.00016.25
7.3.290.0050.01116.30
7.3.280.0100.01016.43
7.3.260.0100.00816.52
7.3.240.0070.01116.46
7.3.230.0120.00616.25
7.3.210.0060.01016.63
7.3.200.0070.01016.71
7.3.190.0130.00916.70
7.3.180.0060.01616.49
7.3.170.0060.01516.54
7.3.160.0150.00016.38
7.3.130.0100.00714.81
7.3.120.0100.00714.52
7.3.110.0060.01315.00
7.3.100.0060.01115.12
7.3.90.0080.00814.86
7.3.80.0130.00515.08
7.3.70.0050.01014.85
7.3.60.0030.01114.58
7.3.50.0030.01214.99
7.3.40.0070.00714.68
7.3.30.0110.00614.90
7.3.20.0070.01015.85
7.3.10.0030.01115.72
7.3.00.0020.01215.84
7.2.330.0090.00916.58
7.2.320.0000.02116.77
7.2.310.0040.01616.68
7.2.300.0090.00816.78
7.2.290.0030.01316.88
7.2.260.0070.01515.34
7.2.250.0030.01515.03
7.2.240.0060.01015.23
7.2.230.0050.01415.08
7.2.220.0060.01115.18
7.2.210.0120.00315.03
7.2.200.0090.00515.05
7.2.190.0080.00714.99
7.2.180.0060.00614.95
7.2.170.0030.01415.09
7.2.160.0030.01115.03
7.2.150.0100.00716.02
7.2.140.0060.00816.00
7.2.130.0060.01116.00
7.2.120.0050.00815.99
7.2.110.0070.01116.09
7.2.100.0060.00916.11
7.2.90.0060.00916.21
7.2.80.0060.00916.11
7.2.70.0070.00915.99
7.2.60.0080.00916.04
7.2.50.0080.00816.06
7.2.40.0070.00916.15
7.2.30.0090.01016.17
7.2.20.0120.00716.12
7.2.10.0060.01316.08
7.2.00.0090.00915.98
7.1.330.0000.01515.93
7.1.320.0090.01015.11
7.1.310.0050.00814.88
7.1.300.0070.00715.06
7.1.290.0030.01115.20
7.1.280.0090.00515.02
7.1.270.0090.00714.93
7.1.260.0040.00815.00
7.1.250.0070.00615.19
7.1.240.0090.00615.76
7.1.230.0040.01115.99
7.1.220.0030.00615.98
7.1.210.0060.00616.08
7.1.200.0030.01315.95
7.1.190.0140.00015.94
7.1.180.0030.01016.09
7.1.170.0090.00015.82
7.1.160.0070.00715.86
7.1.150.0030.01215.93
7.1.140.0030.00915.83
7.1.130.0040.01115.78
7.1.120.0070.00716.06
7.1.110.0000.01215.63
7.1.100.0030.01115.91
7.1.90.0110.00716.11
7.1.80.0070.01115.75
7.1.70.0060.00916.06
7.1.60.0100.00615.98
7.1.50.0070.00716.00
7.1.40.0090.00315.76
7.1.30.0090.00015.92
7.1.20.0000.00915.68
7.1.10.0000.01415.80
7.1.00.0060.00915.74

preferences:
59.28 ms | 400 KiB | 5 Q