3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = [ "\"Test\"", "'Test'", "`Test`", "(Test)", "Test\"", "'Test", "Test`", "(Test", "\"Test'", "'Test\"", "`Test", "Test)", ]; $pattern = '/(?|(["\'`])(Test)\1|\(((Test)\)))/'; foreach ($strings as $string){ $isMatch = preg_match($pattern, $string, $matches); if ($isMatch) { echo "Match $string ==> " . $matches[2] . PHP_EOL; } }

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.10.0120.00618.90
8.5.00.0150.01020.33
8.4.150.0020.00014.05
8.4.140.0140.00817.96
8.4.130.0060.00417.81
8.4.120.0070.01220.69
8.4.110.0140.00618.70
8.4.100.0140.00817.98
8.4.90.0040.00518.05
8.4.80.0130.00718.27
8.4.70.0120.00917.93
8.4.60.0140.00718.56
8.4.50.0130.00717.66
8.4.40.0050.00320.86
8.4.30.0130.00724.20
8.4.20.0030.01618.75
8.4.10.0070.01017.95
8.3.280.0120.00918.62
8.3.270.0140.00516.74
8.3.260.0110.00616.76
8.3.250.0120.00719.16
8.3.240.0120.00716.79
8.3.230.0120.00816.75
8.3.220.0100.00817.20
8.3.210.0130.00716.54
8.3.200.0060.01416.60
8.3.190.0110.00417.27
8.3.180.0140.00417.20
8.3.170.0070.00316.76
8.3.160.0120.00616.60
8.3.150.0150.00717.16
8.3.140.0160.00318.90
8.3.130.0170.00318.45
8.3.120.0030.00620.63
8.3.110.0040.00820.94
8.3.100.0000.00816.50
8.3.90.0040.00418.38
8.3.80.0060.00318.43
8.3.70.0110.00718.55
8.3.60.0220.00018.56
8.3.50.0180.00317.33
8.3.40.0110.00318.89
8.3.30.0130.00318.82
8.3.20.0000.00721.94
8.3.10.0050.00222.04
8.3.00.0080.00023.67
8.2.290.0100.00920.65
8.2.280.0110.00718.91
8.2.270.0100.00016.71
8.2.260.0080.00016.59
8.2.250.0050.00318.73
8.2.240.0090.00017.17
8.2.230.0160.00022.58
8.2.220.0100.01024.06
8.2.210.0110.00326.77
8.2.200.0090.00018.54
8.2.190.0040.01118.66
8.2.180.0100.01017.00
8.2.170.0110.00422.96
8.2.160.0100.00321.29
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00419.79
8.2.110.0100.00020.70
8.2.100.0060.00617.97
8.2.90.0040.00417.88
8.2.80.0040.00719.02
8.2.70.0000.00917.88
8.2.60.0080.00017.88
8.2.50.0040.00418.03
8.2.40.0000.01019.61
8.2.30.0000.00719.33
8.2.20.0040.00418.21
8.2.10.0040.00419.36
8.2.00.0030.00519.41
8.1.330.0130.00616.68
8.1.320.0110.00816.35
8.1.310.0060.00316.39
8.1.300.0090.00920.16
8.1.290.0060.00318.88
8.1.280.0100.00325.92
8.1.270.0030.00522.05
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0050.00522.62
8.1.230.0090.00317.75
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0050.00717.47
8.1.190.0040.00417.35
8.1.180.0000.00818.10
8.1.170.0040.00417.65
8.1.160.0000.00818.83
8.1.150.0070.00018.93
8.1.140.0080.00020.70
8.1.130.0000.00720.17
8.1.120.0040.00417.55
8.1.110.0000.01117.62
8.1.100.0040.00417.50
8.1.90.0000.00817.62
8.1.80.0030.00417.55
8.1.70.0030.00717.58
8.1.60.0040.00417.74
8.1.50.0040.00417.71
8.1.40.0000.00917.66
8.1.30.0060.00617.70
8.1.20.0030.00617.70
8.1.10.0070.00317.80
8.1.00.0030.00617.58
8.0.300.0000.00818.77
8.0.290.0050.00316.75
8.0.280.0030.00418.35
8.0.270.0070.00017.30
8.0.260.0030.00321.77
8.0.250.0070.00017.10
8.0.240.0000.00617.18
8.0.230.0070.00017.09
8.0.220.0000.00716.94
8.0.210.0000.00717.04
8.0.200.0000.00816.98
8.0.190.0030.00517.17
8.0.180.0040.00417.08
8.0.170.0050.00317.07
8.0.160.0070.00317.01
8.0.150.0000.00717.04
8.0.140.0040.00417.06
8.0.130.0050.00013.55
8.0.120.0000.00717.02
8.0.110.0040.00417.02
8.0.100.0040.00416.82
8.0.90.0050.00317.00
8.0.80.0090.00617.00
8.0.70.0080.00017.11
8.0.60.0000.00717.08
8.0.50.0030.00517.00
8.0.30.0060.01617.24
8.0.20.0090.00917.36
8.0.10.0000.00717.04
8.0.00.0150.00516.90
7.4.330.0000.00615.55
7.4.320.0000.00616.83
7.4.300.0030.00316.71
7.4.290.0040.00416.62
7.4.280.0030.00616.80
7.4.270.0040.00416.84
7.4.260.0000.00716.69
7.4.250.0000.00716.64
7.4.240.0000.00716.80
7.4.230.0040.00416.64
7.4.220.0030.00316.90
7.4.210.0020.01216.80
7.4.200.0070.00016.96
7.4.130.0120.00616.59
7.4.120.0090.00816.80
7.4.110.0090.00816.80
7.4.100.0120.00616.75
7.4.90.0150.00316.67
7.4.80.0070.01019.39
7.4.70.0120.00616.60
7.4.60.0160.00016.70
7.4.50.0030.01216.82
7.4.40.0120.00916.81
7.4.00.0070.00715.36
7.3.330.0040.00413.22
7.3.320.0030.00313.37
7.3.310.0030.00316.57
7.3.300.0000.00716.47
7.3.290.0030.00316.50
7.3.280.0070.00716.40
7.3.260.0080.01016.61
7.3.240.0130.00816.64
7.3.230.0060.01216.63
7.3.210.0140.00316.66
7.3.200.0160.00016.45
7.3.190.0120.00616.61
7.3.180.0030.01316.56
7.3.170.0060.01016.47
7.3.160.0070.00716.54
7.3.70.0130.00014.95
7.3.60.0070.01015.05
7.3.50.0080.00514.72
7.3.40.0090.00915.02
7.3.30.0110.00415.12
7.3.20.0090.00616.86
7.3.10.0080.00816.93
7.3.00.0110.01116.81
7.2.330.0030.01616.71
7.2.320.0090.01217.01
7.2.310.0100.00617.06
7.2.300.0060.01316.65
7.2.290.0190.00016.80
7.2.200.0060.00615.14
7.2.190.0070.01015.02
7.2.180.0050.00715.17
7.2.170.0070.01015.09
7.2.160.0060.00914.93
7.2.150.0090.00617.29
7.2.140.0130.00317.04
7.2.130.0040.01217.04
7.2.120.0180.00517.36
7.2.110.0090.01216.81
7.2.100.0160.00817.06
7.2.90.0090.00617.35
7.2.80.0040.01117.23
7.2.70.0090.01217.14
7.2.60.0140.01317.14
7.2.50.0090.00517.20
7.2.40.0130.01017.01
7.2.30.0240.00017.18
7.2.20.0080.01117.04
7.2.10.0030.01017.21
7.2.00.0090.01317.28
7.1.300.0100.01015.98
7.1.290.0060.00616.04
7.1.280.0070.00715.64
7.1.270.0060.01315.75
7.1.260.0090.00616.06
7.1.250.0120.00615.94

preferences:
47.59 ms | 403 KiB | 5 Q