3v4l.org

run code in 300+ PHP versions simultaneously
<?php $needle = ':Name'; $str = ":Name :Name_en"; echo "Leading word boundary\t\t" . preg_replace("#\b$needle\b#", '"Test"', $str); echo "\n---\n"; echo "No leading word boundary\t" . preg_replace("#$needle\b#", '"Test"', $str); echo "\n---\n"; echo "Leading non-word boundary\t" . preg_replace("#\B$needle\b#", '"Test"', $str);

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.0130.00519.58
8.5.20.0130.00620.10
8.5.10.0100.00718.78
8.5.00.0100.01320.30
8.4.180.0150.00720.48
8.4.170.0120.00923.88
8.4.160.0180.01123.73
8.4.150.0060.00716.98
8.4.140.0170.00517.57
8.4.130.0050.00718.74
8.4.120.0110.00824.26
8.4.110.0070.00319.87
8.4.100.0100.01018.84
8.4.90.0120.00722.40
8.4.80.0150.00618.87
8.4.70.0060.00218.09
8.4.60.0130.00718.65
8.4.50.0050.00418.52
8.4.40.0050.00317.98
8.4.30.0060.01318.67
8.4.20.0100.01021.43
8.4.10.0000.00819.62
8.3.300.0120.01020.81
8.3.290.0120.00920.70
8.3.280.0130.00918.59
8.3.270.0110.00916.60
8.3.260.0110.00916.64
8.3.250.0110.00818.79
8.3.240.0090.01117.09
8.3.230.0160.00416.30
8.3.220.0130.00518.84
8.3.210.0090.00916.61
8.3.200.0170.00416.48
8.3.190.0050.00417.08
8.3.180.0100.01017.25
8.3.170.0100.00720.65
8.3.160.0130.00716.95
8.3.150.0120.00617.16
8.3.140.0080.00017.05
8.3.130.0090.00018.34
8.3.120.0040.00420.52
8.3.110.0030.00516.79
8.3.100.0030.00618.72
8.3.90.0090.00626.77
8.3.80.0090.00018.43
8.3.70.0370.01516.63
8.3.60.0340.00316.63
8.3.50.0250.00916.58
8.3.40.0390.00617.50
8.3.30.0430.00017.75
8.3.20.0300.01117.48
8.3.10.0350.00417.75
8.3.00.0160.01217.50
8.2.300.0140.00818.20
8.2.290.0100.00920.39
8.2.280.0140.00918.69
8.2.270.0110.00717.13
8.2.260.0090.00918.23
8.2.250.0090.00916.75
8.2.240.0030.00618.83
8.2.230.0060.00320.94
8.2.220.0090.00024.06
8.2.210.0050.00526.77
8.2.200.0050.00518.52
8.2.190.0240.00616.58
8.2.180.0280.00516.58
8.2.170.0250.01317.75
8.2.160.0270.00217.63
8.2.150.0270.01317.75
8.2.140.0380.00617.38
8.2.130.0370.01317.35
8.2.120.0370.00317.50
8.2.110.0270.00317.25
8.2.100.0190.00217.63
8.2.90.0180.00417.59
8.2.80.0180.00317.63
8.2.70.0180.00617.38
8.2.60.0280.00017.38
8.2.50.0340.00317.75
8.2.40.0340.00617.86
8.2.30.0410.00017.75
8.2.20.0330.00817.50
8.2.10.0350.00617.50
8.2.00.0410.00617.49
8.1.340.0120.00717.82
8.1.330.0120.00621.86
8.1.320.0110.00816.37
8.1.310.0000.00816.65
8.1.300.0040.01118.58
8.1.290.0090.00030.84
8.1.280.0270.01116.58
8.1.270.0320.01417.36
8.1.260.0290.00617.25
8.1.250.0410.00317.38
8.1.240.0320.00617.36
8.1.230.0250.01617.48
8.1.220.0370.00317.48
8.1.210.0300.01117.10
8.1.200.0270.01417.35
8.1.190.0310.00917.38
8.1.180.0290.00717.25
8.1.170.0290.00917.38
8.1.160.0260.00717.46
8.1.150.0210.00317.10
8.1.140.0210.00317.22
8.1.130.0180.00717.21
8.1.120.0200.00417.25
8.1.110.0180.00616.98
8.1.100.0140.01017.11
8.1.90.0160.01017.25
8.1.80.0140.01117.25
8.1.70.0180.00717.22
8.1.60.0210.00617.35
8.1.50.0240.00317.35
8.1.40.0160.00817.25
8.1.30.0200.00317.38
8.1.20.0200.00317.38
8.1.10.0160.00617.35
8.1.00.0160.01117.04

preferences:
43.43 ms | 994 KiB | 5 Q