3v4l.org

run code in 300+ PHP versions simultaneously
<?php $n = 123; $str = "some string with tt=789_ and more"; echo preg_replace("/tt=[0-9]+_\K/", $n, $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.10.0130.00516.71
8.5.00.0090.01321.78
8.4.150.0020.00014.05
8.4.140.0150.00717.88
8.4.130.0070.00317.93
8.4.120.0130.00723.89
8.4.110.0080.01118.64
8.4.100.0140.00818.19
8.4.90.0120.00820.28
8.4.80.0130.00620.80
8.4.70.0040.00519.07
8.4.60.0080.00818.65
8.4.50.0150.00717.88
8.4.40.0100.01017.87
8.4.30.0140.00518.54
8.4.20.0200.00019.94
8.4.10.0100.01019.44
8.3.280.0180.00918.46
8.3.270.0110.00916.72
8.3.260.0120.00516.50
8.3.250.0120.00718.95
8.3.240.0130.00716.46
8.3.230.0100.00916.93
8.3.220.0090.00918.79
8.3.210.0120.00820.75
8.3.200.0050.00416.41
8.3.190.0120.00617.04
8.3.180.0130.00617.23
8.3.170.0060.01318.53
8.3.160.0070.01116.92
8.3.150.0120.00616.87
8.3.140.0090.00316.66
8.3.130.0030.00718.34
8.3.120.0060.00320.87
8.3.110.0060.00320.94
8.3.100.0050.00524.06
8.3.90.0080.00026.77
8.3.80.0290.01830.84
8.3.70.0350.01230.84
8.3.60.0390.00730.84
8.3.50.0120.00330.84
8.3.40.0300.00730.84
8.3.30.0310.00330.84
8.3.20.0150.00930.84
8.3.10.0240.01030.84
8.3.00.0210.00430.84
8.2.290.0100.00718.67
8.2.280.0080.00720.48
8.2.270.0000.00916.93
8.2.260.0120.00618.21
8.2.250.0060.00616.73
8.2.240.0030.00717.04
8.2.230.0130.00322.58
8.2.220.0040.00437.54
8.2.210.0110.00426.77
8.2.200.0260.00430.84
8.2.190.0230.00430.84
8.2.180.0260.00630.84
8.2.170.0350.00030.84
8.2.160.0340.00330.84
8.2.150.0220.01530.84
8.2.140.0380.00730.84
8.2.130.0190.00430.84
8.2.120.0170.01030.84
8.2.110.0400.00630.84
8.2.100.0250.01130.84
8.2.90.0310.00730.84
8.2.80.0290.00830.84
8.2.70.0330.00430.84
8.2.60.0320.00430.84
8.2.50.0380.00030.84
8.2.40.0330.01530.84
8.2.30.0300.00930.84
8.2.20.0410.00030.84
8.2.10.0350.00430.84
8.2.00.0290.01030.84
8.1.330.0130.00616.35
8.1.320.0090.01118.01
8.1.310.0090.00016.23
8.1.300.0080.00020.25
8.1.290.0380.00330.84
8.1.280.0320.00830.84
8.1.270.0400.00330.84
8.1.260.0400.00330.84
8.1.250.0310.01030.84
8.1.240.0310.00630.84
8.1.230.0270.01030.84
8.1.220.0300.00730.84
8.1.210.0270.01130.84
8.1.200.0340.00430.84
8.1.190.0310.00730.84
8.1.180.0290.00830.84
8.1.170.0270.01030.84
8.1.160.0320.00930.84
8.1.150.0340.01230.84
8.1.140.0320.00530.84
8.1.130.0290.00830.84
8.1.120.0260.01130.84
8.1.110.0310.00630.84
8.1.100.0240.01430.84
8.1.90.0330.00430.84
8.1.80.0310.00630.84
8.1.70.0270.01030.84
8.1.60.0350.00930.84
8.1.50.0380.00730.84
8.1.40.0340.00730.84
8.1.30.0190.00030.84
8.1.20.0240.00530.84
8.1.10.0200.00730.84
8.1.00.0110.00830.84

preferences:
36.54 ms | 403 KiB | 5 Q