3v4l.org

run code in 300+ PHP versions simultaneously
<?php $body = ' www.example.com, example.com, example.com/hello.html, example.com/logo.png, example.com/yourbaby.php , example.com/newimage.jpg, www.example.com/newimage.jpg'; //values $oldomain = ['example.com','www.']; $newdomain= ['sample.com', '']; $excludeextension = [".png", ".jpg", ".jpeg"]; //Replace $body = str_replace($olddomain, $newdomain, $body); $body = str_replace($excludeextension, '', $body); //output echo $body;

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.0040.00320.17
8.5.00.0140.00720.13
8.4.150.0030.00014.05
8.4.140.0070.01417.78
8.4.130.0100.00918.88
8.4.120.0130.00820.48
8.4.110.0110.00822.18
8.4.100.0080.01017.73
8.4.90.0140.00618.02
8.4.80.0040.00518.11
8.4.70.0070.00418.03
8.4.60.0130.00718.57
8.4.50.0070.00518.01
8.4.40.0050.00319.82
8.4.30.0100.00720.45
8.4.20.0090.01219.80
8.4.10.0060.00621.82
8.3.280.0150.00918.50
8.3.270.0100.01016.61
8.3.260.0080.01016.33
8.3.250.0100.00818.66
8.3.240.0090.01016.76
8.3.230.0140.00616.54
8.3.220.0090.00817.17
8.3.210.0090.00516.73
8.3.200.0020.00716.46
8.3.190.0110.00717.30
8.3.180.0110.00918.42
8.3.170.0070.01118.93
8.3.160.0070.01118.40
8.3.150.0110.00718.84
8.3.140.0090.00916.45
8.3.130.0050.00318.64
8.3.120.0080.00018.87
8.3.110.0080.00420.94
8.3.100.0050.00524.06
8.3.90.0070.01126.77
8.3.80.0000.00917.97
8.3.70.0120.00318.31
8.3.60.0140.00316.63
8.3.50.0060.01216.57
8.3.40.0100.00320.34
8.3.30.0030.01218.54
8.3.20.0150.00324.18
8.3.10.0140.00324.66
8.3.00.0070.00026.16
8.2.290.0120.00620.70
8.2.280.0030.00520.16
8.2.270.0110.00718.38
8.2.260.0000.00820.73
8.2.250.0030.00616.78
8.2.240.0140.00717.29
8.2.230.0050.00322.58
8.2.220.0040.00437.54
8.2.210.0040.00426.77
8.2.200.0070.00316.63
8.2.190.0140.00418.54
8.2.180.0100.01018.25
8.2.170.0160.00618.93
8.2.160.0120.00322.96
8.2.150.0000.00725.66
8.2.140.0030.00724.66
8.2.130.0060.00326.16
8.2.120.0040.00426.16
8.2.110.0050.00520.85
8.2.100.0080.00417.66
8.2.90.0000.00917.91
8.2.80.0040.00418.22
8.2.70.0050.00317.93
8.2.60.0000.00817.92
8.2.50.0040.00418.10
8.2.40.0040.00422.33
8.2.30.0040.00419.17
8.2.20.0090.00618.87
8.2.10.0130.00418.91
8.2.00.0180.00018.82
8.1.330.0080.01119.99
8.1.320.0110.00716.13
8.1.310.0070.01016.91
8.1.300.0110.00717.68
8.1.290.0090.00030.84
8.1.280.0070.01125.92
8.1.270.0040.00424.66
8.1.260.0040.00426.35
8.1.250.0070.01128.09
8.1.240.0100.00021.95
8.1.230.0080.00322.87
8.1.220.0050.00217.74
8.1.210.0060.00318.77
8.1.200.0000.00817.35
8.1.190.0000.00817.23
8.1.180.0030.00518.10
8.1.170.0000.00918.30
8.1.160.0000.00722.19
8.1.150.0000.00918.73
8.1.140.0120.00418.57
8.1.130.0050.01418.61
8.1.120.0080.00818.54
8.1.110.0100.00718.63
8.1.100.0110.00518.64
8.1.90.0100.00818.63
8.1.80.0120.00518.52
8.1.70.0150.00218.65
8.1.60.0090.00318.85
8.1.50.0000.01118.80
8.1.40.0070.00718.89
8.1.30.0150.00518.90
8.1.20.0120.00818.84
8.1.10.0170.00418.71
8.1.00.0140.00518.73
8.0.300.0000.00719.91
8.0.290.0000.00716.75
8.0.280.0030.00318.29
8.0.270.0100.00518.05
8.0.260.0130.00318.07
8.0.250.0090.00618.06
8.0.240.0140.00018.10
8.0.230.0090.00617.93
8.0.220.0000.01417.98
8.0.210.0020.00917.89
8.0.200.0060.00418.06
8.0.190.0100.00518.13
8.0.180.0080.00018.13
8.0.170.0040.00818.02
8.0.160.0070.00317.99
8.0.150.0070.00717.84
8.0.140.0150.00018.05
8.0.130.0080.00817.90
8.0.120.0170.00018.04
8.0.110.0080.00418.01
8.0.100.0100.00417.90
8.0.90.0070.00718.00
8.0.80.0080.00717.98
8.0.70.0070.00717.90
8.0.60.0090.00518.00
8.0.50.0110.00017.96
8.0.30.0110.00217.96
8.0.20.0060.00618.04
8.0.10.0100.00518.11

preferences:
37.24 ms | 403 KiB | 5 Q