3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = <<<TEXT This is [my_name] and another being <my_name> but this isn't <my_name] because the braces don't match! TEXT; $replacement = 'BOB'; echo preg_replace( '/\[\w+]|<\w+>/', $replacement, $text );

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.0090.00819.62
8.5.20.0100.00819.75
8.5.10.0110.00716.57
8.5.00.0110.01020.08
8.4.180.0150.00622.01
8.4.170.0120.00823.88
8.4.160.0110.01123.95
8.4.150.0080.00616.91
8.4.140.0220.00817.79
8.4.130.0130.00718.11
8.4.120.0100.00920.85
8.4.110.0130.00822.34
8.4.100.0140.00619.16
8.4.90.0120.00820.68
8.4.80.0070.00818.85
8.4.70.0150.00918.15
8.4.60.0110.01018.95
8.4.50.0130.00818.41
8.4.40.0140.00717.72
8.4.30.0160.00318.75
8.4.20.0100.01019.78
8.4.10.0170.00019.43
8.3.300.0090.01022.91
8.3.290.0150.00518.47
8.3.280.0130.00818.64
8.3.270.0130.00816.58
8.3.260.0100.00916.56
8.3.250.0100.00718.71
8.3.240.0110.00816.73
8.3.230.0120.00816.63
8.3.220.0140.00618.83
8.3.210.0090.00816.73
8.3.200.0070.00216.72
8.3.190.0060.00818.82
8.3.180.0050.00317.16
8.3.170.0090.00918.88
8.3.160.0110.00716.54
8.3.150.0100.01016.94
8.3.140.0080.00017.14
8.3.130.0080.00016.88
8.3.120.0000.00820.71
8.3.110.0080.00016.63
8.3.100.0050.00316.75
8.3.90.0050.00318.33
8.3.80.0450.00730.84
8.3.70.0460.00730.84
8.3.60.0430.01230.84
8.3.50.0060.00930.84
8.3.40.0300.00030.84
8.3.30.0240.00030.84
8.3.20.0130.00830.84
8.3.10.0220.00330.84
8.3.00.0190.00330.84
8.2.300.0070.01218.84
8.2.290.0090.01020.58
8.2.280.0110.00718.64
8.2.270.0070.01117.23
8.2.260.0060.00318.45
8.2.250.0090.00616.83
8.2.240.0030.00618.57
8.2.230.0050.00320.94
8.2.220.0030.00624.06
8.2.210.0160.00326.77
8.2.200.0210.00030.84
8.2.190.0230.00030.84
8.2.180.0190.00430.84
8.2.170.0220.00730.84
8.2.160.0370.00730.84
8.2.150.0280.00330.84
8.2.140.0390.00030.84
8.2.130.0320.01330.84
8.2.120.0230.00030.84
8.2.110.0250.00030.84
8.2.100.0150.00930.84
8.2.90.0240.00430.84
8.2.80.0190.00430.84
8.2.70.0190.00930.84
8.2.60.0230.00330.84
8.2.50.0160.01630.84
8.2.40.0230.00430.84
8.2.30.0130.01330.84
8.2.20.0140.00930.84
8.2.10.0180.00830.84
8.2.00.0290.01030.84
8.1.340.0100.01017.64
8.1.330.0100.00822.14
8.1.320.0110.00718.29
8.1.310.0030.00916.68
8.1.300.0130.00616.16
8.1.290.0290.01430.84
8.1.280.0310.01430.84
8.1.270.0380.00730.84
8.1.260.0370.01030.84
8.1.250.0290.01230.84
8.1.240.0350.00430.84
8.1.230.0250.00830.84
8.1.220.0190.00430.84
8.1.210.0200.00030.84
8.1.200.0140.01030.84
8.1.190.0160.00430.84
8.1.180.0220.00430.84
8.1.170.0310.00430.84
8.1.160.0310.00830.84
8.1.150.0380.00330.84
8.1.140.0400.00030.84
8.1.130.0300.01030.84
8.1.120.0290.00430.84
8.1.110.0180.01230.84
8.1.100.0250.01330.84
8.1.90.0210.00730.84
8.1.80.0210.01030.84
8.1.70.0190.00630.84
8.1.60.0170.01030.84
8.1.50.0260.00730.84
8.1.40.0180.00530.84
8.1.30.0180.00630.84
8.1.20.0250.00030.84
8.1.10.0180.00730.84
8.1.00.0190.00330.84

preferences:
49.4 ms | 988 KiB | 5 Q