3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text='Hello. I have two dots. Please replace them!'; echo IHateStrReplace(".","_",$text); function IHateStrReplace($replace_from,$replace_to,$input) { $result=""; for($i=0;$i<strlen($input);$i++) { $result.= ($input[$i]==$replace_from)?$replace_to:$input[$i]; } return $result; }

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.4.20.0140.00717.64
8.4.10.0050.00517.77
8.3.150.0150.00417.07
8.3.140.0080.00016.44
8.3.130.0000.00818.25
8.3.120.0040.01118.82
8.3.110.0040.00420.94
8.3.100.0060.00316.65
8.3.90.0120.00326.77
8.3.80.0000.01120.40
8.3.70.0170.00016.63
8.3.60.0150.00316.63
8.3.50.0070.00922.11
8.3.40.0060.01318.73
8.3.30.0070.00718.98
8.3.20.0040.00420.34
8.3.10.0090.00023.65
8.3.00.0040.00419.81
8.2.270.0060.01216.66
8.2.260.0110.00718.89
8.2.250.0040.00416.59
8.2.240.0070.01018.90
8.2.230.0080.00322.58
8.2.220.0060.00324.06
8.2.210.0030.01026.77
8.2.200.0000.00916.63
8.2.190.0040.01816.75
8.2.180.0150.00016.88
8.2.170.0000.01422.96
8.2.160.0100.00720.53
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0000.00819.19
8.2.110.0070.00320.35
8.2.100.0040.00817.91
8.2.90.0060.00318.28
8.2.80.0040.00417.97
8.2.70.0090.00017.63
8.2.60.0040.00418.03
8.2.50.0000.00918.07
8.2.40.0040.00418.34
8.2.30.0000.00818.32
8.2.20.0040.00417.77
8.2.10.0000.00818.02
8.2.00.0080.00019.32
8.1.310.0060.00316.94
8.1.300.0080.00018.09
8.1.290.0030.00618.88
8.1.280.0110.00325.92
8.1.270.0040.00423.79
8.1.260.0070.00026.35
8.1.250.0070.00728.09
8.1.240.0090.00022.19
8.1.230.0080.00320.91
8.1.220.0050.00317.79
8.1.210.0040.00418.85
8.1.200.0060.00317.35
8.1.190.0000.00817.13
8.1.180.0040.00418.10
8.1.170.0090.00018.55
8.1.160.0040.00422.04
8.1.150.0020.00518.61
8.1.140.0040.00417.47
8.1.130.0030.00317.84
8.1.120.0000.00717.55
8.1.110.0000.00817.43
8.1.100.0040.00317.45
8.1.90.0030.00517.38
8.1.80.0050.00317.44
8.1.70.0050.00317.32
8.1.60.0040.00417.61
8.1.50.0050.00217.42
8.1.40.0080.00017.50
8.1.30.0000.00817.66
8.1.20.0040.00417.52
8.1.10.0040.00417.55
8.1.00.0040.00417.56
8.0.300.0040.00420.09
8.0.290.0040.00416.63
8.0.280.0000.00718.46
8.0.270.0070.00017.27
8.0.260.0000.00817.29
8.0.250.0000.00816.92
8.0.240.0000.00816.95
8.0.230.0080.00016.85
8.0.220.0030.00316.77
8.0.210.0040.00416.82
8.0.200.0000.00816.84
8.0.190.0040.00416.84
8.0.180.0090.00316.89
8.0.170.0050.00516.83
8.0.160.0070.00016.85
8.0.150.0040.00416.81
8.0.140.0050.00316.83
8.0.130.0060.00013.34
8.0.120.0000.00816.70
8.0.110.0050.00316.77
8.0.100.0040.00416.64
8.0.90.0000.00716.94
8.0.80.0030.01216.80
8.0.70.0000.00816.82
8.0.60.0000.00716.72
8.0.50.0070.00016.81
8.0.30.0130.00717.00
8.0.20.0100.01117.21
8.0.10.0140.00316.96
8.0.00.0090.01216.87
7.4.330.0000.00615.00
7.4.320.0030.00316.55
7.4.300.0060.00016.51
7.4.290.0040.00416.51
7.4.280.0050.00316.52
7.4.270.0000.00816.68
7.4.260.0030.00316.58
7.4.250.0040.00416.62
7.4.240.0040.00416.65
7.4.230.0000.00716.43
7.4.220.0130.01316.70
7.4.210.0060.01016.69
7.4.200.0040.00416.52
7.4.160.0130.00516.53
7.4.150.0090.01016.97
7.4.140.0100.01117.42
7.4.130.0080.01016.53
7.4.120.0110.00616.52
7.4.110.0110.00716.64
7.4.100.0120.00816.52
7.4.90.0090.00816.49
7.4.80.0050.01417.94
7.4.70.0080.01016.38
7.4.60.0060.01216.54
7.4.50.0070.00716.40
7.4.40.0110.01116.45
7.4.30.0070.00916.52
7.4.20.0060.00916.47
7.4.10.0100.00916.54
7.4.00.0040.01315.46
7.3.330.0000.00613.21
7.3.320.0030.00313.23
7.3.310.0070.00016.39
7.3.300.0000.00716.39
7.3.290.0030.01316.38
7.3.280.0070.01116.38
7.3.270.0100.00816.86
7.3.260.0120.00916.49
7.3.250.0140.00416.50
7.3.240.0110.00616.52
7.3.230.0120.00516.45
7.3.220.0120.00916.36
7.3.210.0100.00816.35
7.3.200.0090.00917.85
7.3.190.0090.00816.44
7.3.180.0090.00816.28
7.3.170.0110.00916.29
7.3.160.0110.00816.43
7.3.150.0140.00016.28
7.3.140.0120.00616.36
7.3.130.0030.01516.36
7.3.120.0060.01115.37
7.3.110.0040.01315.52
7.3.100.0090.00915.57
7.3.90.0120.00715.73
7.3.80.0020.01215.76
7.3.70.0040.01115.61
7.3.60.0070.00815.68
7.3.50.0070.00815.71
7.3.40.0100.00815.60
7.3.30.0090.00715.69
7.3.20.0080.00616.56
7.3.10.0100.00616.49
7.3.00.0070.00816.39
7.2.340.0100.01016.43
7.2.330.0110.00616.45
7.2.320.0130.00916.65
7.2.310.0080.01116.54
7.2.300.0090.00816.57
7.2.290.0060.01116.55
7.2.280.0030.01716.45
7.2.270.0100.01016.36
7.2.260.0080.00816.50
7.2.250.0070.01315.78
7.2.240.0110.00815.82
7.2.230.0080.00615.76
7.2.220.0050.01015.92
7.2.210.0000.01515.76
7.2.200.0090.00915.73
7.2.190.0070.01015.86
7.2.180.0080.00815.68
7.2.170.0060.00915.82
7.2.160.0050.01316.55
7.2.150.0150.00616.64
7.2.140.0100.01016.71
7.2.130.0100.01316.86
7.2.120.0000.01616.66
7.2.110.0030.01116.76
7.2.100.0030.01216.71
7.2.90.0150.00616.71
7.2.80.0050.01216.73
7.2.70.0040.01216.71
7.2.60.0080.00816.84
7.2.50.0210.00016.53
7.2.40.0030.01516.73
7.2.30.0120.00917.25
7.2.20.0130.01117.26
7.2.10.0300.01417.64
7.2.00.0170.01217.59
7.1.330.0350.00915.57
7.1.320.0100.01115.76
7.1.310.0120.00515.62
7.1.300.0120.00915.71
7.1.290.0120.00915.58
7.1.280.0120.00915.47
7.1.270.0070.01015.65
7.1.260.0130.00715.71
7.1.250.0150.01215.48
7.1.240.0180.00715.50
7.1.230.0340.01015.50
7.1.220.0650.00715.50
7.1.210.0110.01315.47
7.1.200.0090.00915.69
7.1.190.0170.00915.46
7.1.180.0170.01015.46
7.1.170.0210.01215.49
7.1.160.0180.01415.38
7.1.150.0170.01316.13
7.1.140.0440.01116.16
7.1.130.0280.00716.52
7.1.120.0300.01116.49
7.1.110.0320.00715.98
7.1.100.0240.00715.90
7.1.90.0170.01416.03
7.1.80.0380.01215.87
7.1.70.0240.00815.28
7.1.60.0370.01128.82
7.1.50.0390.01228.57
7.1.40.0320.01528.35
7.1.30.0260.00928.30
7.1.20.0280.01228.35
7.1.10.0160.01014.84
7.1.00.0190.00815.02
7.0.330.0200.00815.32
7.0.320.0120.01215.28
7.0.310.0210.00315.25
7.0.300.0100.01715.30
7.0.290.0240.00615.28
7.0.280.0200.01015.13
7.0.270.0240.01416.10
7.0.260.0320.00516.11
7.0.250.0310.00715.72
7.0.240.0220.01115.72
7.0.230.0240.01215.80
7.0.220.0280.00915.64
7.0.210.0220.00914.95
7.0.200.0300.00815.14
7.0.190.0250.01014.94
7.0.180.0160.00914.69
7.0.170.0230.00714.70
7.0.160.0170.01114.58
7.0.150.0160.00914.63
7.0.140.0160.01014.68
7.0.130.0150.01114.90
7.0.120.0150.00814.83
7.0.110.0170.01014.62
7.0.100.0130.01214.68
7.0.90.0160.01114.79
7.0.80.0150.01014.81
7.0.70.0180.01114.72
7.0.60.0920.00814.60
7.0.50.0150.01114.73
7.0.40.0150.00914.94
7.0.30.0310.00814.94
7.0.20.0190.00614.82
7.0.10.0480.00714.87
7.0.00.0140.00614.89
5.6.400.0150.01515.89
5.6.390.0170.01416.00
5.6.380.0100.01915.79
5.6.370.0100.01315.80
5.6.360.0230.01015.77
5.6.350.0330.00715.92
5.6.340.0220.01015.86
5.6.330.0170.01115.92
5.6.320.0150.01215.85
5.6.310.0150.01015.88
5.6.300.0140.04819.51
5.6.290.0170.05319.60
5.6.280.0150.05019.64
5.6.270.0190.04619.60
5.6.260.0170.04219.68
5.6.250.0080.05119.57
5.6.240.0180.04719.61
5.6.230.0130.04919.68
5.6.220.0210.04419.71
5.6.210.0180.04319.70
5.6.200.0150.04619.62
5.6.190.0130.04819.69
5.6.180.0170.04919.63
5.6.170.0130.04619.65
5.6.160.0140.04919.61
5.6.150.0170.05319.71
5.6.140.0140.05019.63
5.6.130.0110.04619.61
5.6.120.0170.05219.58
5.6.110.0140.04619.52
5.6.100.0120.04719.53
5.6.90.0140.04919.56
5.6.80.0170.04519.12
5.6.70.0080.05219.10
5.6.60.0140.05019.16
5.6.50.0130.04219.09
5.6.40.0140.04619.17
5.6.30.0120.05119.14
5.6.20.0170.05319.15
5.6.10.0150.04819.07
5.6.00.0200.04619.10
5.5.380.0150.05117.11
5.5.370.0150.04417.11
5.5.360.0180.04217.13
5.5.350.0140.04217.01
5.5.340.0150.04617.31
5.5.330.0160.04417.42
5.5.320.0160.04517.38
5.5.310.0090.04717.50
5.5.300.0130.04717.41
5.5.290.0090.05217.39
5.5.280.0190.04117.42
5.5.270.0150.05717.45
5.5.260.0180.04317.43
5.5.250.0120.05117.26
5.5.240.0130.04817.07
5.5.230.0160.04316.96
5.5.220.0130.04417.00
5.5.210.0110.04616.90
5.5.200.0160.04316.98
5.5.190.0110.05016.96
5.5.180.0170.04616.95
5.5.170.0210.00715.77
5.5.160.0230.03916.94
5.5.150.0100.04616.92
5.5.140.0150.04216.81
5.5.130.0160.04316.98
5.5.120.0130.04116.97
5.5.110.0120.04316.93
5.5.100.0130.05016.96
5.5.90.0160.03816.83
5.5.80.0140.04116.83
5.5.70.0140.04716.92
5.5.60.0190.04416.82
5.5.50.0150.04216.78
5.5.40.0090.04716.94
5.5.30.0150.04116.82
5.5.20.0130.04116.92
5.5.10.0100.04516.82
5.5.00.0120.05116.86
5.4.450.0170.04817.69
5.4.440.0150.04517.65
5.4.430.0120.04817.71
5.4.420.0180.04317.77
5.4.410.0200.04617.65
5.4.400.0110.04417.42
5.4.390.0130.05117.40
5.4.380.0070.04917.42
5.4.370.0090.04717.42
5.4.360.0140.04517.44
5.4.350.0160.04417.44
5.4.340.0160.04517.52
5.4.330.0130.01112.71
5.4.320.0110.04917.41
5.4.310.0140.04217.45
5.4.300.0100.04517.41
5.4.290.0130.04217.48
5.4.280.0140.04117.45
5.4.270.0110.04417.49
5.4.260.0120.04017.40
5.4.250.0160.04617.39
5.4.240.0140.04017.54
5.4.230.0160.04617.41
5.4.220.0110.04917.37
5.4.210.0140.04717.37
5.4.200.0130.04217.35
5.4.190.0140.04017.48
5.4.180.0120.04117.44
5.4.170.0140.04617.45
5.4.160.0090.04617.49
5.4.150.0140.04017.36
5.4.140.0100.04515.59
5.4.130.0140.03715.62
5.4.120.0130.03915.63
5.4.110.0090.04415.72
5.4.100.0100.04215.69
5.4.90.0170.03515.71
5.4.80.0140.04015.59
5.4.70.0080.04415.64
5.4.60.0100.04315.58
5.4.50.0110.03715.61
5.4.40.0100.04115.59
5.4.30.0110.03815.69
5.4.20.0140.04015.69
5.4.10.0130.04515.69
5.4.00.0110.03815.12
5.3.290.0150.04414.39
5.3.280.0090.04314.28
5.3.270.0080.04614.35
5.3.260.0100.04814.43
5.3.250.0110.04414.39
5.3.240.0110.04614.38
5.3.230.0130.04314.28
5.3.220.0140.04214.24
5.3.210.0120.04614.30
5.3.200.0180.03614.33
5.3.190.0100.05014.30
5.3.180.0140.03914.25
5.3.170.0120.04514.43
5.3.160.0160.03714.26
5.3.150.0100.04114.22
5.3.140.0190.04214.34
5.3.130.0150.04414.24
5.3.120.0130.04614.35
5.3.110.0150.04714.29
5.3.100.0100.04113.86
5.3.90.0100.04013.90
5.3.80.0160.04213.90
5.3.70.0120.03913.86
5.3.60.0160.04013.81
5.3.50.0150.04013.86
5.3.40.0130.03813.85
5.3.30.0110.03813.83
5.3.20.0100.04213.70
5.3.10.0100.04213.52
5.3.00.0120.03913.48
5.2.170.0140.03111.55
5.2.160.0120.03011.50
5.2.150.0100.03411.40
5.2.140.0100.03311.46
5.2.130.0100.03411.40
5.2.120.0100.03111.42
5.2.110.0110.03011.40
5.2.100.0090.03211.45
5.2.90.0080.03511.31
5.2.80.0100.03511.37
5.2.70.0110.03411.42
5.2.60.0110.03711.38
5.2.50.0090.03411.30
5.2.40.0100.03011.39
5.2.30.0100.03211.38
5.2.20.0090.03311.34
5.2.10.0090.03211.21
5.2.00.0150.02811.05
5.1.60.0090.02510.39
5.1.50.0070.02910.27
5.1.40.0050.03310.45
5.1.30.0130.02710.64
5.1.20.0110.03010.71
5.1.10.0090.03310.45
5.1.00.0110.02910.53
5.0.50.0080.0239.60
5.0.40.0070.0259.55
5.0.30.0060.0389.46
5.0.20.0050.0249.52
5.0.10.0060.0259.43
5.0.00.0070.0359.45
4.4.90.0040.0189.36
4.4.80.0050.0179.36
4.4.70.0040.0189.36
4.4.60.0070.0169.36
4.4.50.0030.0189.36
4.4.40.0070.0289.36
4.4.30.0040.0189.36
4.4.20.0040.0199.36
4.4.10.0060.0189.36
4.4.00.0030.0319.36
4.3.110.0030.0229.36
4.3.100.0050.0159.36
4.3.90.0030.0189.36
4.3.80.0070.0259.36
4.3.70.0050.0189.36
4.3.60.0030.0179.36
4.3.50.0060.0159.36
4.3.40.0040.0289.36
4.3.30.0030.0179.36
4.3.20.0020.0189.36
4.3.10.0030.0189.36
4.3.00.0030.0189.36

preferences:
30.88 ms | 403 KiB | 5 Q