3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = microtime(true); for ($i = 0; $i < 1000; $i++) strtr('React/Controller/Website/User', '/', '_'); printf('%.09f', microtime(true) - $s); $s = microtime(true); for ($i = 0; $i < 1000; $i++) str_replace('/', '_', 'React/Controller/Website/User'); printf('%.09f', microtime(true) - $s);

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)
7.4.10.0000.01515.03
7.4.00.0060.01014.90
7.3.130.0070.01314.64
7.3.120.0000.01314.86
7.3.110.0000.01614.63
7.3.100.0140.00014.98
7.3.90.0080.00814.84
7.3.80.0110.00414.84
7.3.70.0080.00814.65
7.3.60.0070.00714.80
7.3.50.0070.01014.96
7.3.40.0040.00414.80
7.3.30.0030.01014.63
7.3.20.0140.00316.66
7.3.10.0030.01216.37
7.3.00.0070.00816.58
7.2.260.0100.01015.04
7.2.250.0100.01014.92
7.2.240.0070.00715.19
7.2.230.0070.01014.71
7.2.220.0100.00715.00
7.2.210.0000.01415.13
7.2.200.0060.00914.89
7.2.190.0000.01715.06
7.2.180.0060.00314.83
7.2.170.0070.01014.95
7.2.160.0110.00415.04
7.2.150.0150.00016.68
7.2.140.0030.01016.74
7.2.130.0100.00716.70
7.2.120.0040.00916.69
7.2.110.0030.01216.76
7.2.100.0110.00916.88
7.2.90.0090.01216.64
7.2.80.0060.01416.72
7.2.70.0150.01016.57
7.2.60.0070.01016.72
7.2.50.0080.01016.71
7.2.40.0070.00516.79
7.2.30.0110.00616.78
7.2.20.0050.01116.79
7.2.10.0080.00716.77
7.2.00.0050.01117.57
7.1.330.0120.00315.84
7.1.320.0030.01015.55
7.1.310.0070.00715.80
7.1.300.0060.00615.61
7.1.290.0070.00715.79
7.1.280.0060.00615.40
7.1.270.0070.00715.58
7.1.260.0090.00615.73
7.1.250.0100.00715.50
7.1.240.0040.01115.78
7.1.230.0040.00915.80
7.1.220.0030.01015.70
7.1.210.0090.00015.87
7.1.200.0070.01015.57
7.1.190.0030.01215.72
7.1.180.0030.01015.59
7.1.170.0000.01315.67
7.1.160.0070.00715.75
7.1.150.0060.01215.82
7.1.140.0090.00615.44
7.1.130.0040.01115.50
7.1.120.0030.01015.48
7.1.110.0070.00415.57
7.1.100.0100.00315.64
7.1.90.0070.00415.78
7.1.80.0030.01415.59
7.1.70.0030.00916.43
7.1.60.0090.01017.62
7.1.50.0080.01016.18
7.1.40.0030.01215.91
7.1.30.0070.01015.72
7.1.20.0090.00615.84
7.1.10.0040.00815.64
7.1.00.0100.03519.15
7.0.330.0000.01315.37
7.0.320.0060.00815.05
7.0.310.0030.01415.53
7.0.300.0030.01315.26
7.0.290.0070.00715.39
7.0.280.0070.00715.15
7.0.270.0100.00315.59
7.0.260.0000.01115.16
7.0.250.0000.01115.43
7.0.240.0090.00315.40
7.0.230.0040.01415.33
7.0.220.0120.00315.27
7.0.210.0100.00315.29
7.0.200.0060.00315.96
7.0.190.0040.00815.52
7.0.180.0060.01115.37
7.0.170.0040.01115.43
7.0.160.0060.01015.43
7.0.150.0100.00315.43
7.0.140.0070.03618.59
7.0.130.0030.01315.48
7.0.120.0040.03818.56
7.0.110.0000.00815.49
7.0.100.0140.00015.51
7.0.90.0030.01015.45
7.0.80.0030.00615.46
7.0.70.0150.00015.30
7.0.60.0030.04417.62
7.0.50.0050.02516.68
7.0.40.0120.04116.71
7.0.30.0110.02516.76
7.0.20.0080.02916.76
7.0.10.0100.04316.91
7.0.00.0080.03016.85
5.6.400.0000.01214.08
5.6.390.0100.00314.20
5.6.380.0150.00314.46
5.6.370.0030.01014.34
5.6.360.0000.01314.01
5.6.350.0030.01014.28
5.6.340.0060.01214.32
5.6.330.0030.01414.52
5.6.320.0090.00614.28
5.6.310.0070.00714.38
5.6.300.0030.01214.48
5.6.290.0100.00714.48
5.6.280.0080.03817.46
5.6.270.0030.01314.23
5.6.260.0150.00014.52
5.6.250.0000.01614.39
5.6.240.0060.00614.17
5.6.230.0060.00914.19
5.6.220.0030.01013.96
5.6.210.0120.03817.47
5.6.200.0140.04016.16
5.6.190.0070.04517.18
5.6.180.0160.03017.49
5.6.170.0080.03617.42
5.6.160.0080.04517.49
5.6.150.0060.04016.26
5.6.140.0070.02916.17
5.6.130.0100.02816.25
5.6.120.0080.04517.52
5.6.110.0050.05217.55
5.6.100.0110.04817.52
5.6.90.0080.02217.64
5.6.80.0100.04017.17
5.6.70.0110.00314.27
5.6.60.0080.00414.22
5.6.50.0030.01013.99
5.6.40.0040.01114.12
5.6.30.0040.01114.34
5.6.20.0060.00614.09
5.6.10.0030.01413.96
5.6.00.0060.00914.18
5.5.380.0030.01014.16
5.5.370.0030.01214.27
5.5.360.0030.00914.18
5.5.350.0110.02117.28
5.5.340.0040.04016.02
5.5.330.0080.04417.25
5.5.320.0280.03617.13
5.5.310.0250.03817.38
5.5.300.0040.02416.07
5.5.290.0030.03216.05
5.5.280.0080.04517.46
5.5.270.0050.02417.63
5.5.260.0050.02317.45
5.5.250.0050.04017.26
5.5.240.0050.04316.94
5.5.230.0000.00914.05
5.5.220.0050.00514.29
5.5.210.0070.00714.20
5.5.200.0060.00614.31
5.5.190.0040.01114.06
5.5.180.0110.00713.94
5.5.170.0030.01014.06
5.5.160.0070.00714.08
5.5.150.0090.00614.15
5.5.140.0040.01114.22
5.5.130.0090.00014.22
5.5.120.0070.01013.78
5.5.110.0000.01813.81
5.5.100.0030.01213.99
5.5.90.0030.01313.91
5.5.80.0060.01214.17
5.5.70.0090.00314.38
5.5.60.0060.00914.07
5.5.50.0070.01013.75
5.5.40.0040.00814.04
5.5.30.0030.00614.23
5.5.20.0070.00713.61
5.5.10.0070.01013.79
5.5.00.0030.01814.33
5.4.450.0060.02015.17
5.4.440.0040.02215.03
5.4.430.0050.02315.16
5.4.420.0030.02215.00
5.4.410.0050.03515.11
5.4.400.0030.02314.76
5.4.390.0060.04214.97
5.4.380.0040.03315.02
5.4.370.0030.04714.95
5.4.360.0020.03414.81
5.4.350.0050.04214.75
5.4.340.0050.03815.01
5.4.330.0060.01011.09
5.4.320.0010.03014.98
5.4.310.0080.04015.13
5.4.300.0050.04215.04
5.4.290.0070.03815.01
5.4.280.0020.03914.88
5.4.270.0060.02814.90
5.4.260.0070.02514.82
5.4.250.0090.03914.82
5.4.240.0080.03714.90
5.4.230.0110.03314.79
5.4.220.0050.04014.82
5.4.210.0030.03014.89
5.4.200.0120.01814.99
5.4.190.0030.02615.05
5.4.180.0100.03614.93
5.4.170.0070.04315.03
5.4.160.0100.03814.87
5.4.150.0020.05014.88
5.4.140.0120.03713.42
5.4.130.0080.03413.51
5.4.120.0070.04213.59
5.4.110.0090.04113.29
5.4.100.0020.04513.69
5.4.90.0100.03813.43
5.4.80.0080.03313.40
5.4.70.0070.04213.78
5.4.60.0100.03813.63
5.4.50.0070.04013.51
5.4.40.0000.04613.55
5.4.30.0050.04313.47
5.4.20.0020.04313.47
5.4.10.0050.04013.59
5.4.00.0120.03013.35
5.3.290.0070.03812.64
5.3.280.0030.03712.39
5.3.270.0080.04112.49
5.3.260.0120.03412.51
5.3.250.0030.04312.62
5.3.240.0030.04512.43
5.3.230.0030.03812.44
5.3.220.0100.03312.22
5.3.210.0030.04512.39
5.3.200.0030.04112.37
5.3.190.0000.05012.47
5.3.180.0090.03912.49
5.3.170.0030.03112.44
5.3.160.0050.04212.51
5.3.150.0090.04212.53
5.3.140.0070.03712.33
5.3.130.0030.02512.47
5.3.120.0050.02012.44
5.3.110.0100.03812.46
5.3.100.0100.03712.00
5.3.90.0100.03012.13
5.3.80.0080.03912.16
5.3.70.0050.04112.11
5.3.60.0020.04312.10
5.3.50.0070.03612.11
5.3.40.0050.04212.06
5.3.30.0050.02712.17
5.3.20.0030.03011.97
5.3.10.0110.03311.96
5.3.00.0030.02811.89
5.2.170.0030.05711.13
5.2.160.0130.05711.08
5.2.150.0030.06011.22
5.2.140.0070.02711.04
5.2.130.0030.06311.18
5.2.120.0030.06711.00
5.2.110.0070.05710.98
5.2.100.0130.05311.09
5.2.90.0030.05311.08
5.2.80.0070.06011.02
5.2.70.0130.05711.18
5.2.60.0070.04711.01
5.2.50.0070.05711.11
5.2.40.0100.05010.84
5.2.30.0030.06010.94
5.2.20.0030.04010.89
5.2.10.0000.05710.89
5.2.00.0100.04010.70
5.1.60.0030.05010.14
5.1.50.0130.04310.07
5.1.40.0070.05310.05
5.1.30.0030.06010.41
5.1.20.0070.05710.39
5.1.10.0030.03710.16
5.1.00.0000.03010.14
5.0.50.0030.0278.53
5.0.40.0070.0438.41
5.0.30.0030.0638.29
5.0.20.0000.0238.19
5.0.10.0070.0378.21
5.0.00.0030.0378.28
4.4.90.0100.0307.88
4.4.80.0030.0177.88
4.4.70.0070.0337.88
4.4.60.0030.0237.88
4.4.50.0070.0337.88
4.4.40.0030.0577.88
4.4.30.0030.0207.88
4.4.20.0000.0207.88
4.4.10.0000.0407.88
4.4.00.0070.0377.88
4.3.110.0030.0237.88
4.3.100.0000.0177.88
4.3.90.0030.0277.88
4.3.80.0030.0577.88
4.3.70.0070.0337.88
4.3.60.0000.0277.88
4.3.50.0030.0407.88
4.3.40.0000.0377.88
4.3.30.0000.0337.88
4.3.20.0030.0377.88
4.3.10.0000.0377.88
4.3.00.0030.0377.88

preferences:
35.92 ms | 401 KiB | 5 Q