3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '/(.*?)(\[\w{3}=\')(\w+\.\w+)(\'\])(.*?)(\[\w{3}=\')(\w+\.\w+).*/s'; $str = 'Hello, view this pdf [PDF=\'hello.pdf\'] and then view this PDF [PDF=\'goodmorning.pdf\']'; $subst = '$0'; $result = preg_replace($re, $subst, $str); echo $result;

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.0140.00418.31
8.3.50.0120.01216.26
8.3.40.0160.00018.91
8.3.30.0040.01118.89
8.3.20.0050.00320.33
8.3.10.0000.00823.52
8.3.00.0040.00421.88
8.2.180.0140.00018.79
8.2.170.0030.01422.96
8.2.160.0110.00719.16
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0000.00721.07
8.2.120.0000.00926.35
8.2.110.0090.00022.24
8.2.100.0070.00418.03
8.2.90.0000.00819.17
8.2.80.0040.00418.05
8.2.70.0000.00817.71
8.2.60.0030.00517.93
8.2.50.0050.00318.10
8.2.40.0040.00420.65
8.2.30.0040.00421.08
8.2.20.0030.00517.98
8.2.10.0030.00518.16
8.2.00.0000.00818.15
8.1.280.0100.00725.92
8.1.270.0070.00022.18
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0040.00422.20
8.1.230.0110.00019.15
8.1.220.0000.00817.74
8.1.210.0030.00518.77
8.1.200.0030.00617.48
8.1.190.0000.00817.36
8.1.180.0040.00418.10
8.1.170.0030.00618.70
8.1.160.0040.00419.00
8.1.150.0000.00820.64
8.1.140.0000.00719.44
8.1.130.0040.00418.86
8.1.120.0060.00317.54
8.1.110.0000.00717.40
8.1.100.0080.00017.55
8.1.90.0000.00817.54
8.1.80.0040.00417.50
8.1.70.0000.00717.52
8.1.60.0040.00417.72
8.1.50.0030.00517.61
8.1.40.0070.00017.58
8.1.30.0000.00817.61
8.1.20.0000.00817.78
8.1.10.0000.00817.68
8.1.00.0040.00417.46
8.0.300.0030.00618.77
8.0.290.0030.00516.88
8.0.280.0030.00318.45
8.0.270.0040.00417.35
8.0.260.0000.00716.89
8.0.250.0030.00317.11
8.0.240.0040.00417.10
8.0.230.0030.00317.06
8.0.220.0030.00316.90
8.0.210.0000.00816.88
8.0.200.0030.00316.95
8.0.190.0030.00617.02
8.0.180.0000.00917.01
8.0.170.0040.00417.05
8.0.160.0000.00716.95
8.0.150.0040.00417.00
8.0.140.0000.00716.80
8.0.130.0030.00313.40
8.0.120.0040.00416.94
8.0.110.0040.00416.88
8.0.100.0040.00416.88
8.0.90.0040.00416.84
8.0.80.0040.01116.94
8.0.70.0030.00616.85
8.0.60.0040.00416.96
8.0.50.0000.00716.84
8.0.30.0130.00917.17
8.0.20.0120.00917.40
8.0.10.0030.00317.00
8.0.00.0090.00916.87
7.4.330.0000.00615.55
7.4.320.0000.00616.68
7.4.300.0060.00016.67
7.4.290.0030.00516.64
7.4.280.0040.00416.76
7.4.270.0000.00716.78
7.4.260.0000.00816.65
7.4.250.0040.00416.77
7.4.240.0000.00716.77
7.4.230.0040.00416.82
7.4.220.0230.00316.78
7.4.210.0070.01016.73
7.4.200.0070.00016.66
7.4.160.0090.00616.68
7.4.150.0100.01117.40
7.4.140.0100.00817.86
7.4.130.0140.00316.79
7.4.120.0130.00616.61
7.4.110.0060.01916.68
7.4.100.0140.00416.77
7.4.90.0100.00716.86
7.4.80.0080.01319.39
7.4.70.0090.00916.58
7.4.60.0100.01316.38
7.4.50.0060.01016.52
7.4.40.0120.00416.68
7.4.30.0120.01916.63
7.4.00.0110.00714.97
7.3.330.0040.00313.18
7.3.320.0030.00213.36
7.3.310.0000.00716.36
7.3.300.0000.00716.35
7.3.290.0050.01016.34
7.3.280.0070.01016.35
7.3.270.0070.01017.40
7.3.260.0110.01016.41
7.3.250.0090.00916.51
7.3.240.0150.00716.65
7.3.230.0070.01416.75
7.3.210.0120.00616.46
7.3.200.0090.00716.32
7.3.190.0130.00316.52
7.3.180.0090.00616.39
7.3.170.0120.00616.27
7.3.160.0090.00616.45
7.2.330.0080.00816.68
7.2.320.0140.00616.78
7.2.310.0070.01616.90
7.2.300.0060.01016.69
7.2.290.0170.00716.77
7.2.60.0140.00717.21
7.1.200.0100.00715.99
7.1.100.0000.00918.59
7.1.70.0310.00415.52
7.1.60.0400.01533.59
7.1.50.0470.01033.12
7.1.40.0610.00633.00
7.1.30.0410.00932.80
7.1.20.0460.00932.78
7.1.10.0390.00014.91
7.1.00.0250.00715.04
7.0.200.0330.01315.03
7.0.190.0300.01314.88
7.0.180.0240.01014.80
7.0.170.0270.00814.77
7.0.160.0260.01014.52
7.0.150.0240.01014.54
7.0.140.0230.01014.67
7.0.130.0220.01214.88
7.0.120.0210.00914.93
7.0.110.0280.00314.63
7.0.100.0190.01314.64
7.0.90.0230.00914.87
7.0.80.0190.01114.75
7.0.70.0260.00414.71
7.0.60.0860.00314.54
7.0.50.0230.00814.98
7.0.40.0250.00715.02
7.0.30.0230.00914.93
7.0.20.0260.00714.95
7.0.10.0190.01314.73
7.0.00.0220.00814.59

preferences:
59.32 ms | 400 KiB | 5 Q