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.0090.00618.56
8.3.50.0070.00718.30
8.3.40.0090.00618.97
8.3.30.0000.01618.79
8.3.20.0020.00521.89
8.3.10.0040.00422.11
8.3.00.0040.00420.77
8.2.180.0060.01218.66
8.2.170.0110.00719.14
8.2.160.0100.00722.96
8.2.150.0070.00724.18
8.2.140.0060.00324.66
8.2.130.0000.00726.16
8.2.120.0030.00526.16
8.2.110.0060.00321.25
8.2.100.0040.00817.97
8.2.90.0080.00018.03
8.2.80.0080.00017.97
8.2.70.0040.00417.93
8.2.60.0050.00318.16
8.2.50.0030.00618.10
8.2.40.0070.00019.35
8.2.30.0050.00219.28
8.2.20.0070.00018.13
8.2.10.0030.00419.21
8.2.00.0040.00419.27
8.1.280.0070.00725.92
8.1.270.0030.00622.47
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00323.84
8.1.230.0090.00622.68
8.1.220.0040.00417.74
8.1.210.0000.00918.77
8.1.200.0030.00717.48
8.1.190.0040.00417.23
8.1.180.0050.00318.10
8.1.170.0040.00420.89
8.1.160.0000.00718.95
8.1.150.0040.00418.76
8.1.140.0070.00020.20
8.1.130.0030.00320.10
8.1.120.0000.00717.56
8.1.110.0030.00517.43
8.1.100.0080.00017.53
8.1.90.0050.00217.45
8.1.80.0000.00817.54
8.1.70.0000.00717.57
8.1.60.0050.00517.68
8.1.50.0030.00617.54
8.1.40.0050.00317.61
8.1.30.0000.00817.68
8.1.20.0040.00417.74
8.1.10.0040.00417.63
8.1.00.0040.00717.50
8.0.300.0050.00221.64
8.0.290.0040.00416.88
8.0.280.0030.00318.52
8.0.270.0000.00817.14
8.0.260.0060.00019.97
8.0.250.0040.00417.08
8.0.240.0000.00717.03
8.0.230.0000.00716.95
8.0.220.0030.00316.95
8.0.210.0030.00316.93
8.0.200.0000.00816.93
8.0.190.0050.00217.02
8.0.180.0050.00316.93
8.0.170.0030.00617.04
8.0.160.0040.00416.96
8.0.150.0050.00316.88
8.0.140.0050.00316.92
8.0.130.0060.00013.36
8.0.120.0030.00616.85
8.0.110.0050.00316.88
8.0.100.0040.00416.92
8.0.90.0000.00917.01
8.0.80.0090.00716.95
8.0.70.0050.00316.89
8.0.60.0000.00816.83
8.0.50.0000.00817.01
8.0.30.0130.00317.19
8.0.20.0100.01017.40
8.0.10.0050.00316.88
8.0.00.0110.00817.03
7.4.330.0000.00615.55
7.4.320.0000.00716.71
7.4.300.0000.00616.55
7.4.290.0000.00716.73
7.4.280.0000.01016.76
7.4.270.0000.00716.67
7.4.260.0000.00513.47
7.4.250.0070.00016.60
7.4.240.0030.00416.67
7.4.230.0070.00016.52
7.4.220.0000.00716.63
7.4.210.0070.00916.69
7.4.200.0030.00316.86
7.4.130.0100.00716.60
7.4.120.0110.00716.80
7.4.110.0120.00616.47
7.4.100.0130.00616.42
7.4.90.0120.00916.48
7.4.80.0130.00319.39
7.4.70.0100.01016.75
7.4.60.0060.01216.66
7.4.50.0040.01416.77
7.4.40.0100.00716.64
7.4.00.0000.01614.84
7.3.330.0000.00816.43
7.3.320.0030.00313.17
7.3.310.0000.00716.40
7.3.300.0000.00716.39
7.3.290.0110.00816.39
7.3.280.0110.01116.33
7.3.260.0120.00716.44
7.3.240.0100.00716.57
7.3.230.0120.00616.46
7.3.210.0130.00416.70
7.3.200.0040.01316.51
7.3.190.0060.01116.72
7.3.180.0170.00016.73
7.3.170.0070.01016.37
7.3.160.0090.00616.23
7.3.100.0110.00714.90
7.3.90.0060.01115.06
7.3.80.0080.00815.18
7.3.70.0070.00714.91
7.3.60.0070.00614.80
7.3.50.0090.00614.70
7.3.40.0030.01014.79
7.3.30.0070.00714.86
7.3.20.0030.01015.06
7.3.10.0120.00914.67
7.3.00.0120.00414.93
7.2.330.0090.01016.48
7.2.320.0030.01916.71
7.2.310.0070.01116.71
7.2.300.0060.01316.75
7.2.290.0080.00816.64
7.2.230.0080.01215.00
7.2.220.0190.01415.03
7.2.210.0090.00615.09
7.2.200.0060.00915.20
7.2.190.0090.00615.23
7.2.180.0070.00715.16
7.2.170.0110.00315.00
7.2.160.0100.00415.18
7.2.150.0120.00415.14
7.2.140.0100.01015.17
7.2.130.0090.01214.94
7.2.120.0060.01015.20
7.2.110.0080.00815.16
7.2.100.0100.00614.95
7.2.90.0130.00315.00
7.2.80.0220.02515.05
7.2.70.0090.00615.25
7.2.60.0110.00415.25
7.2.50.0040.01115.30
7.2.40.0090.00615.24
7.2.30.0060.01215.08
7.2.20.0130.00615.13
7.2.10.0090.01014.88
7.2.00.0080.00815.06
7.1.320.0060.00914.41
7.1.310.0000.01414.01
7.1.300.0070.00714.28
7.1.290.0090.00314.13
7.1.280.0070.00713.91
7.1.270.0070.00714.00
7.1.260.0140.00414.21
7.1.250.0160.00314.07

preferences:
45.61 ms | 400 KiB | 5 Q