3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = "/mystring"; $pattern = "~/?(\w+)(?:\?(\w+))?~"; if (preg_match($pattern, $input, $matches)) { print_r($matches); }

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.30.0120.00621.32
8.5.20.0100.00819.49
8.5.10.0080.00916.67
8.5.00.0060.00419.98
8.4.180.0120.00825.65
8.4.170.0140.00823.85
8.4.160.0130.00823.69
8.4.150.0090.00416.92
8.4.140.0130.00817.61
8.4.130.0040.00417.82
8.4.120.0120.00820.42
8.4.110.0090.00922.54
8.4.100.0090.00618.66
8.4.90.0080.01118.78
8.4.80.0040.00518.04
8.4.70.0070.00317.79
8.4.60.0070.01318.80
8.4.50.0050.00420.59
8.4.40.0130.00719.67
8.4.30.0160.00321.96
8.4.20.0060.01519.04
8.4.10.0070.01019.39
8.3.300.0120.01222.73
8.3.290.0130.00818.41
8.3.280.0080.00316.33
8.3.270.0120.00916.55
8.3.260.0110.00916.73
8.3.250.0120.00818.80
8.3.240.0110.00916.66
8.3.230.0150.00416.48
8.3.220.0110.00817.04
8.3.210.0140.00418.37
8.3.200.0050.00416.49
8.3.190.0070.00716.94
8.3.180.0130.00716.81
8.3.170.0150.00317.25
8.3.160.0090.00916.76
8.3.150.0040.01420.59
8.3.140.0030.00517.18
8.3.130.0060.00318.60
8.3.120.0140.00018.72
8.3.110.0060.00920.94
8.3.100.0030.00724.06
8.3.90.0120.00626.77
8.3.80.0090.00018.43
8.3.70.0060.00916.50
8.3.60.0000.01418.55
8.3.50.0100.00217.34
8.3.40.0070.01118.66
8.3.30.0110.00718.89
8.3.20.0000.00820.41
8.3.10.0040.00423.61
8.3.00.0070.00022.47
8.2.300.0120.00818.02
8.2.290.0100.00820.44
8.2.280.0100.01018.55
8.2.270.0100.00717.11
8.2.260.0080.00016.79
8.2.250.0080.00018.52
8.2.240.0050.00318.79
8.2.230.0060.00322.58
8.2.220.0030.00637.54
8.2.210.0100.00026.77
8.2.200.0120.00018.54
8.2.190.0080.00817.00
8.2.180.0040.01118.40
8.2.170.0040.01122.96
8.2.160.0060.00922.27
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0080.00020.88
8.2.120.0040.00426.35
8.2.110.0040.00422.45
8.2.100.0090.00317.83
8.2.90.0040.00417.75
8.2.80.0040.00417.97
8.2.70.0040.00417.93
8.2.60.0050.00318.22
8.2.50.0040.00418.10
8.2.40.0000.00920.42
8.2.30.0040.00419.26
8.2.20.0070.00018.13
8.2.10.0040.00419.21
8.2.00.0050.00218.07
8.1.340.0170.00818.27
8.1.330.0110.01021.96
8.1.320.0100.01016.38
8.1.310.0070.00718.30
8.1.300.0090.00020.37
8.1.290.0060.00330.84
8.1.280.0000.01825.92
8.1.270.0030.00620.42
8.1.260.0090.00026.35
8.1.250.0070.00028.09
8.1.240.0070.01022.14
8.1.230.0080.00318.96
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0070.00317.35
8.1.190.0080.00017.23
8.1.180.0050.00518.10
8.1.170.0040.00418.63
8.1.160.0040.00718.75
8.1.150.0070.00018.87
8.1.140.0000.00720.28
8.1.130.0050.00320.29
8.1.120.0000.00717.48
8.1.110.0000.00717.59
8.1.100.0000.00717.55
8.1.90.0000.00817.44
8.1.80.0040.00417.49
8.1.70.0070.00017.43
8.1.60.0030.00717.55
8.1.50.0050.00317.48
8.1.40.0080.00017.47
8.1.30.0000.00817.75
8.1.20.0030.00617.67
8.1.10.0050.00317.68
8.1.00.0030.00617.61
8.0.300.0030.00621.63
8.0.290.0000.00716.75
8.0.280.0030.00318.38
8.0.270.0000.00816.90
8.0.260.0000.00620.02
8.0.250.0070.00017.06
8.0.240.0000.00717.05
8.0.230.0070.00016.94
8.0.220.0080.00316.86
8.0.210.0050.00216.93
8.0.200.0070.00017.00
8.0.190.0000.00716.99
8.0.180.0040.00416.90
8.0.170.0030.00516.81
8.0.160.0000.00716.92
8.0.150.0040.00416.94
8.0.140.0000.00716.88
8.0.130.0000.00813.39
8.0.120.0040.00416.92
8.0.110.0000.00916.93
8.0.100.0060.00317.03
8.0.90.0000.00716.80
8.0.80.0110.00516.95
8.0.70.0040.00416.88
8.0.60.0000.00716.97
8.0.50.0000.00716.88
8.0.30.0100.00717.09
8.0.20.0170.00317.11
8.0.10.0000.00717.20
8.0.00.0090.01116.85
7.4.330.0030.00315.55
7.4.320.0030.00316.66
7.4.300.0030.00316.63
7.4.290.0000.00716.77
7.4.280.0030.00516.64
7.4.270.0070.00016.79
7.4.260.0030.00616.70
7.4.250.0000.00716.53
7.4.240.0040.00416.47
7.4.230.0040.00416.64
7.4.220.0040.00416.70
7.4.210.0110.00916.73
7.4.200.0040.00416.53
7.4.160.0080.00716.69
7.4.140.0170.00317.86
7.4.130.0100.01016.96
7.4.120.0030.01416.43
7.4.110.0030.01316.66
7.4.100.0160.01016.82
7.4.90.0080.00916.40
7.4.80.0070.01019.39
7.4.70.0110.00716.68
7.4.60.0060.00916.52
7.4.50.0000.01416.57
7.4.40.0120.00616.48
7.4.00.0070.01014.98
7.3.330.0000.00513.11
7.3.320.0030.00313.18
7.3.310.0030.00316.43
7.3.300.0030.00316.15
7.3.290.0040.01016.31
7.3.280.0060.01016.30
7.3.260.0100.00916.47
7.3.230.0100.00616.45
7.3.210.0130.00316.40
7.3.200.0110.00616.63
7.3.190.0060.01216.26
7.3.180.0190.00316.58
7.3.170.0040.01316.55
7.3.160.0130.00316.56
7.3.120.0090.00615.04
7.3.110.0050.01214.86
7.3.100.0060.00614.82
7.3.90.0100.00514.79
7.3.80.0030.01014.80
7.3.70.0060.00914.80
7.3.60.0080.00814.73
7.3.50.0030.00814.61
7.3.40.0030.00814.85
7.3.30.0110.00614.68
7.3.20.0260.00916.05
7.3.10.0230.00816.07
7.3.00.0230.00816.08
7.2.330.0140.00416.55
7.2.320.0110.01116.44
7.2.310.0170.00016.50
7.2.300.0030.01416.75
7.2.290.0050.01316.64
7.2.250.0070.01114.92
7.2.240.0090.01015.01
7.2.230.0010.01215.03
7.2.220.0030.01214.88
7.2.210.0080.00415.04
7.2.200.0020.01014.88
7.2.190.0070.00715.05
7.2.180.0020.01214.73
7.2.170.0110.00414.87
7.2.160.0120.00714.85
7.2.150.0870.00816.01
7.2.140.0380.01115.90
7.2.130.0410.00915.75
7.2.120.0390.00815.64
7.2.110.0340.01115.71
7.2.100.0430.00615.77
7.2.90.0410.01115.97
7.2.80.0380.00815.84
7.2.70.0330.00815.81
7.2.60.0420.00315.96
7.2.50.0330.00815.91
7.2.40.0370.00315.86
7.2.30.0370.00915.83
7.2.20.0390.01115.92
7.2.10.0320.01115.71
7.2.00.0440.00515.84
7.1.330.0030.01115.92
7.1.320.0030.00815.85
7.1.310.0030.01215.73
7.1.300.0060.00515.75
7.1.290.0030.00915.71
7.1.280.0050.00815.78
7.1.270.0280.00715.24
7.1.260.0330.00715.14
7.1.250.0360.00914.93

preferences:
61.12 ms | 1494 KiB | 5 Q