3v4l.org

run code in 300+ PHP versions simultaneously
<?php $target = "abcwa"; echo preg_replace('/./', 'w:$0', $target); echo "\n"; echo preg_replace('/(?=.)/', 'w:', $target);

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.00719.68
8.5.00.0160.00620.34
8.4.150.0020.00014.05
8.4.140.0150.00917.67
8.4.130.0120.00818.20
8.4.120.0110.01117.83
8.4.110.0060.00318.07
8.4.100.0070.00718.98
8.4.90.0030.00618.93
8.4.80.0140.00718.72
8.4.70.0040.00418.09
8.4.60.0150.00518.88
8.4.50.0120.01118.63
8.4.40.0130.00620.49
8.4.30.0130.00618.78
8.4.20.0170.00319.78
8.4.10.0030.00621.87
8.3.280.0100.01020.14
8.3.270.0130.00916.89
8.3.260.0130.00616.73
8.3.250.0090.00618.80
8.3.240.0130.00616.93
8.3.230.0070.00216.72
8.3.220.0080.00918.71
8.3.210.0100.00516.76
8.3.200.0110.00716.84
8.3.190.0040.00316.92
8.3.180.0050.01416.83
8.3.170.0120.00620.48
8.3.160.0090.00916.58
8.3.150.0090.00916.55
8.3.140.0030.00616.73
8.3.130.0030.00618.56
8.3.120.0060.00318.87
8.3.110.0040.00420.94
8.3.100.0000.01024.06
8.3.90.0000.00826.77
8.3.80.0060.00317.97
8.3.70.0110.00718.65
8.3.60.0140.00718.68
8.3.50.0090.00616.87
8.3.40.0170.00321.82
8.3.30.0150.00018.97
8.3.20.0060.00324.18
8.3.10.0070.00024.66
8.3.00.0040.00426.16
8.2.290.0100.00920.36
8.2.280.0100.00818.52
8.2.270.0070.00017.11
8.2.260.0070.01117.05
8.2.250.0000.00818.48
8.2.240.0090.00019.03
8.2.230.0100.00022.58
8.2.220.0070.00337.54
8.2.210.0080.00426.77
8.2.200.0060.00616.50
8.2.190.0090.00618.66
8.2.180.0040.01416.88
8.2.170.0070.00719.16
8.2.160.0140.00022.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0090.00019.77
8.2.110.0040.00420.52
8.2.100.0090.00318.03
8.2.90.0050.00318.00
8.2.80.0040.00418.87
8.2.70.0040.00417.63
8.2.60.0020.00717.71
8.2.50.0110.00717.63
8.2.40.0120.00417.63
8.2.30.0130.00417.50
8.2.20.0130.00417.38
8.2.10.0150.00417.38
8.2.00.0140.00217.49
8.1.330.0100.00821.87
8.1.320.0100.01116.22
8.1.310.0070.01117.02
8.1.300.0070.00318.11
8.1.290.0040.00430.84
8.1.280.0130.01025.92
8.1.270.0000.00921.95
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0030.00618.87
8.1.230.0110.00020.84
8.1.220.0000.00818.70
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0120.00516.88
8.1.180.0170.00017.25
8.1.170.0130.00417.50
8.1.160.0050.01117.22
8.1.150.0110.00717.00
8.1.140.0050.01117.00
8.1.130.0150.00217.13
8.1.120.0130.00417.00
8.1.110.0110.00517.25
8.1.100.0120.00417.25
8.1.90.0100.00817.23
8.1.80.0110.00617.25
8.1.70.0140.00317.25
8.1.60.0150.00317.22
8.1.50.0140.00517.38
8.1.40.0070.01117.36
8.1.30.0090.00917.38
8.1.20.0130.00417.25
8.1.10.0120.00617.25
8.1.00.0120.00617.13
8.0.300.0000.00718.77
8.0.290.0080.00016.88
8.0.280.0160.00016.63
8.0.270.0140.00316.75
8.0.260.0150.00316.88
8.0.250.0050.01016.61
8.0.240.0130.00316.50
8.0.230.0170.00016.63
8.0.220.0110.00516.63
8.0.210.0160.00016.72
8.0.200.0170.00016.38
8.0.190.0070.01016.49
8.0.180.0170.00016.38
8.0.170.0100.00616.38
8.0.160.0150.00316.38
8.0.150.0080.00816.47
8.0.140.0140.00516.38
8.0.130.0050.01116.37
8.0.120.0140.00316.38
8.0.110.0170.00016.38
8.0.100.0130.00216.50
8.0.90.0130.00316.59
8.0.80.0130.00316.11
8.0.70.0100.00616.50
8.0.60.0090.00616.72
8.0.50.0150.00316.63
8.0.30.0090.00616.63
8.0.20.0140.00016.50
8.0.10.0060.01216.75

preferences:
35.21 ms | 403 KiB | 5 Q