3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'this is test'; preg_match('/(?<test>.+)/', $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.00718.30
8.3.50.0150.00018.13
8.3.40.0150.00018.97
8.3.30.0120.00418.96
8.3.20.0030.00519.01
8.3.10.0080.00020.91
8.3.00.0080.00023.65
8.2.180.0160.00716.63
8.2.170.0150.00322.96
8.2.160.0110.00419.36
8.2.150.0080.00024.18
8.2.140.0030.00624.66
8.2.130.0040.00421.25
8.2.120.0050.00326.35
8.2.110.0160.00621.30
8.2.100.0070.00417.79
8.2.90.0050.00317.97
8.2.80.0080.00017.97
8.2.70.0030.00617.90
8.2.60.0000.00817.91
8.2.50.0030.00618.10
8.2.40.0050.00319.22
8.2.30.0000.00719.34
8.2.20.0000.00718.09
8.2.10.0040.00417.93
8.2.00.0040.00419.44
8.1.280.0070.00725.92
8.1.270.0040.00422.00
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0070.00322.45
8.1.230.0080.00420.95
8.1.220.0050.00317.74
8.1.210.0000.00818.91
8.1.200.0040.00417.47
8.1.190.0030.00617.22
8.1.180.0000.00818.10
8.1.170.0030.00718.63
8.1.160.0070.00018.79
8.1.150.0040.00418.86
8.1.140.0040.00417.65
8.1.130.0040.00418.94
8.1.120.0050.00217.43
8.1.110.0040.00417.55
8.1.100.0030.00617.52
8.1.90.0030.00517.53
8.1.80.0050.00317.44
8.1.70.0050.00217.45
8.1.60.0030.00617.71
8.1.50.0050.00317.46
8.1.40.0030.00517.66
8.1.30.0080.00017.84
8.1.20.0040.00717.79
8.1.10.0000.01017.60
8.1.00.0000.00817.64
8.0.300.0040.00419.88
8.0.290.0080.00016.75
8.0.280.0000.00718.40
8.0.270.0070.00017.16
8.0.260.0000.01017.26
8.0.250.0030.00317.03
8.0.240.0000.00817.00
8.0.230.0030.00317.02
8.0.220.0050.00316.96
8.0.210.0030.00316.96
8.0.200.0030.00316.88
8.0.190.0060.00316.98
8.0.180.0000.00816.97
8.0.170.0000.00916.99
8.0.160.0000.00816.93
8.0.150.0070.00016.75
8.0.140.0030.00316.93
8.0.130.0000.00613.34
8.0.120.0030.00516.83
8.0.110.0020.00516.90
8.0.100.0030.00317.04
8.0.90.0030.00516.89
8.0.80.0050.00916.93
8.0.70.0040.00416.99
8.0.60.0020.00516.82
8.0.50.0050.00216.91
8.0.30.0130.00317.20
8.0.20.0060.00917.28
8.0.10.0040.00316.95
8.0.00.0060.00916.94
7.4.330.0030.00315.55
7.4.320.0030.00316.55
7.4.300.0000.00716.59
7.4.290.0040.00416.66
7.4.280.0030.00616.66
7.4.270.0030.00316.64
7.4.260.0030.00316.71
7.4.250.0070.00016.71
7.4.240.0030.00516.64
7.4.230.0030.00316.86
7.4.220.0060.00216.67
7.4.210.0060.00616.68
7.4.200.0040.00316.57
7.4.190.0000.00716.88
7.4.180.0050.00316.60
7.4.160.0090.00716.77
7.4.150.0030.00316.70
7.4.140.0140.00817.64
7.4.130.0060.00816.65
7.4.120.0110.00616.67
7.4.110.0040.00816.47
7.4.100.0080.00716.59
7.4.90.0020.01016.79
7.4.80.0090.00517.99
7.4.70.0030.00916.57
7.4.60.0070.00516.88
7.4.50.0050.00516.47
7.4.40.0090.00316.55
7.4.30.0070.00016.59
7.4.20.0030.00316.33
7.4.10.0030.00316.52
7.4.00.0080.00315.76
7.3.330.0000.00513.30
7.3.320.0060.00013.27
7.3.310.0000.00716.41
7.3.300.0040.00416.26
7.3.290.0020.00516.29
7.3.280.0080.00516.29
7.3.270.0030.00316.39
7.3.260.0100.00816.51
7.3.250.0060.00016.37
7.3.240.0040.01116.40
7.3.230.0050.00716.47
7.3.220.0000.00716.28
7.3.210.0080.00416.48
7.3.200.0070.00616.39
7.3.190.0110.00316.17
7.3.180.0040.00816.40
7.3.170.0080.00316.25
7.3.160.0040.00816.36
7.3.150.0040.00416.22
7.3.140.0000.00716.32
7.3.130.0000.00716.13
7.3.120.0030.00316.24
7.3.110.0040.00416.20
7.3.100.0000.00716.13
7.3.90.0030.00316.65
7.3.80.0000.00616.34
7.3.70.0060.00016.23
7.3.60.0030.00316.44
7.3.50.0030.00316.43
7.3.40.0030.00316.45
7.3.30.0030.00316.24
7.3.20.0030.00318.10
7.3.10.0000.00718.22
7.3.00.0040.00418.20
7.2.340.0080.00016.48
7.2.330.0060.00616.53
7.2.320.0150.00916.51
7.2.310.0030.01216.61
7.2.300.0090.00416.61
7.2.290.0050.00916.56
7.2.280.0000.00816.48
7.2.270.0070.00016.49
7.2.260.0030.00316.42
7.2.250.0030.00316.32
7.2.240.0030.00316.45
7.2.230.0000.00716.51
7.2.220.0030.00316.39
7.2.210.0000.00816.49
7.2.200.0000.00816.41
7.2.190.0030.00316.46
7.2.180.0050.00316.52
7.2.170.0040.00416.69
7.2.160.0000.00716.63
7.2.150.0070.00018.41
7.2.140.0040.00418.51
7.2.130.0070.00018.49
7.2.120.0080.00018.46
7.2.110.0000.00718.40
7.2.100.0040.00418.46
7.2.90.0040.00418.54
7.2.80.0030.00518.43
7.2.70.0140.01316.78
7.2.60.0150.00516.62
7.2.50.0120.00716.58
7.2.40.0140.00316.83
7.2.30.0170.00516.88
7.2.20.0170.00316.89
7.2.10.0510.00416.67
7.2.00.0180.00516.75
7.1.330.0000.00817.52
7.1.320.0000.00717.27
7.1.310.0000.00617.48
7.1.300.0000.00617.46
7.1.290.0070.00017.49
7.1.280.0000.00617.41
7.1.270.0070.00017.38
7.1.260.0030.00317.39
7.1.250.0040.00417.39
7.1.240.0000.00717.25
7.1.230.0030.00317.49
7.1.220.0070.00017.41
7.1.210.0000.00717.34
7.1.200.0040.00516.48
7.1.190.0030.00317.44
7.1.180.0000.00617.31
7.1.170.0150.00715.63
7.1.160.0100.00815.75
7.1.150.0100.00615.75
7.1.140.0110.00615.81
7.1.130.0150.00215.71
7.1.120.0120.00715.64
7.1.110.0110.01315.81
7.1.100.0110.00815.74
7.1.90.0170.00715.75
7.1.80.0170.00515.65
7.1.70.0160.00615.62
7.1.60.0320.00524.78
7.1.50.0220.00824.91
7.1.40.0230.00624.87
7.1.30.0290.01024.82
7.1.20.0200.00824.84
7.1.10.0200.00315.77
7.1.00.0150.00715.70
7.0.330.0060.00017.11
7.0.320.0030.00317.07
7.0.310.0030.00317.04
7.0.300.0000.00717.16
7.0.290.0060.00017.11
7.0.280.0060.00017.04
7.0.270.0060.00017.07
7.0.260.0060.00017.05
7.0.250.0070.00017.24
7.0.240.0000.00717.01
7.0.230.0000.00717.19
7.0.220.0020.00517.02
7.0.210.0040.00417.09
7.0.200.0020.00516.96
7.0.190.0070.00017.01
7.0.180.0080.00016.89
7.0.170.0000.00817.22
7.0.160.0000.00717.04
7.0.150.0000.00716.99
7.0.140.0050.00217.14
7.0.130.0000.00617.21
7.0.120.0000.00617.19
7.0.110.0000.00817.13
7.0.100.0000.00616.99
7.0.90.0030.00616.98
7.0.80.0040.00417.02
7.0.70.0030.00616.99
7.0.60.0070.00016.90
7.0.50.0040.00416.93
7.0.40.0020.00516.96
7.0.30.0030.00616.94
7.0.20.0020.00516.97
7.0.10.0000.00817.05
7.0.00.0080.00016.86
5.6.400.0000.00615.76
5.6.390.0070.00015.85
5.6.380.0030.00315.91
5.6.370.0030.00315.73
5.6.360.0030.00315.76
5.6.350.0030.00315.65
5.6.340.0030.00315.64
5.6.330.0000.00715.71
5.6.320.0030.00315.64
5.6.310.0040.00415.77
5.6.300.0000.00615.58
5.6.290.0000.00615.73
5.6.280.0000.00615.63
5.6.270.0000.00615.91
5.6.260.0000.00715.74
5.6.250.0050.00215.71
5.6.240.0000.00715.64
5.6.230.0000.00715.79
5.6.220.0030.00315.84
5.6.210.0070.00015.78
5.6.200.0080.00015.88
5.6.190.0080.00016.04
5.6.180.0030.00515.86
5.6.170.0000.00816.07
5.6.160.0060.00315.76
5.6.150.0030.00615.85
5.6.140.0040.00415.82
5.6.130.0030.00615.80
5.6.120.0050.00315.73
5.6.110.0080.00015.86
5.6.100.0070.00215.70
5.6.90.0000.00815.80
5.6.80.0000.00815.79
5.6.70.0030.00516.10
5.6.60.0050.00516.06
5.6.50.0070.00015.88
5.6.40.0030.00315.79
5.6.30.0000.00715.71
5.6.20.0050.00215.58
5.6.10.0030.00315.79
5.6.00.0000.00715.58

preferences:
73.96 ms | 401 KiB | 5 Q