3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'Convert spaces to dash and LowerCase with PHP'; $separator = '-'; $str_replace = str_replace(' ', $separator, strtolower($str)); $wordwrap = wordwrap(strtolower($str), 1, $separator, 0); echo 'Original: ' . "\t" . $str . "\n"; echo 'str_replace: ' . "\t" . $str_replace . "\n"; echo 'wordwrap: ' . "\t" . $wordwrap . "\n";

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.0170.00317.65
8.4.10.0040.00419.40
8.3.150.0110.00716.45
8.3.140.0030.00518.45
8.3.130.0060.00316.67
8.3.120.0130.00620.57
8.3.110.0060.00320.94
8.3.100.0040.00424.06
8.3.90.0080.00626.77
8.3.80.0030.00617.97
8.3.70.0110.00416.50
8.3.60.0090.00918.36
8.3.50.0130.00622.85
8.3.40.0000.01518.63
8.3.30.0120.00318.61
8.3.20.0000.00723.66
8.3.10.0000.00723.55
8.3.00.0050.00319.85
8.2.260.0120.00318.07
8.2.250.0040.00420.42
8.2.240.0080.00316.97
8.2.230.0090.00622.58
8.2.220.0040.00437.54
8.2.210.0000.00726.77
8.2.200.0060.00318.41
8.2.190.0120.00318.48
8.2.180.0110.01118.41
8.2.170.0100.01022.96
8.2.160.0100.01020.27
8.2.150.0080.00024.18
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0070.00021.00
8.2.110.0100.00020.47
8.2.100.0100.00017.78
8.2.90.0040.00417.87
8.2.80.0080.00019.16
8.2.70.0100.00448.41
8.2.60.0080.00548.46
8.2.50.0080.00548.54
8.2.40.0080.00449.40
8.2.30.0090.00350.14
8.2.20.0060.00648.56
8.2.10.0060.00848.68
8.2.00.0060.00548.74
8.1.310.0040.00418.36
8.1.300.0040.00417.78
8.1.290.0060.00330.84
8.1.280.0140.00325.92
8.1.270.0080.00023.79
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0120.00819.01
8.1.230.0070.00720.85
8.1.220.0070.00017.78
8.1.210.0030.00518.77
8.1.200.0080.00548.28
8.1.190.0110.00148.23
8.1.180.0060.00648.71
8.1.170.0050.00649.24
8.1.160.0090.00350.70
8.1.150.0050.00650.11
8.1.140.0030.00849.43
8.1.130.0040.00748.34
8.1.120.0100.00248.43
8.1.110.0080.00448.38
8.1.100.0080.00448.36
8.1.90.0050.00748.35
8.1.80.0050.00748.41
8.1.70.0080.00348.37
8.1.60.0110.00248.40
8.1.50.0050.00848.42
8.1.40.0060.00748.42
8.1.30.0060.00748.49
8.1.20.0110.00248.46
8.1.10.0080.00648.36
8.1.00.0090.00348.41
8.0.300.0000.00719.95
8.0.290.0060.00547.98
8.0.280.0070.00648.81
8.0.270.0050.00748.34
8.0.260.0060.00548.08
8.0.250.0080.00348.14
8.0.240.0040.00848.13
8.0.230.0110.00248.08
8.0.220.0080.00348.11
8.0.210.0090.00348.13
8.0.200.0080.00448.16
8.0.190.0040.00948.15
8.0.180.0070.00648.07
8.0.170.0070.00548.10
8.0.160.0070.00448.11
8.0.150.0080.00448.07
8.0.140.0080.00548.10
8.0.130.0050.00646.30
8.0.120.0060.00648.08
8.0.110.0070.00448.05
8.0.100.0060.00648.11
8.0.90.0070.00548.04
8.0.80.0060.01048.13
8.0.70.0120.00148.12
8.0.60.0100.00247.99
8.0.50.0060.00648.04
8.0.30.0080.01037.85
8.0.20.0100.00932.88
8.0.10.0100.00148.06
8.0.00.0120.00448.04
7.4.330.0090.00047.21
7.4.320.0020.00947.88
7.4.300.0110.00147.90
7.4.290.0050.01037.40
7.4.280.0100.00447.94
7.4.270.0100.00247.89
7.4.260.0050.00647.93
7.4.250.0060.00547.93
7.4.240.0060.00437.37
7.4.230.0060.00647.98
7.4.220.0060.00947.99
7.4.210.0110.00447.95
7.4.200.0090.00247.98
7.4.190.0130.00379.33
7.4.180.0140.00279.33
7.4.160.0080.00737.43
7.4.150.0150.00148.37
7.4.140.0100.00638.35
7.4.130.0070.00937.41
7.4.120.0080.00837.43
7.4.110.0090.00947.88
7.4.100.0120.00447.84
7.4.90.0110.00547.92
7.4.80.0090.01038.30
7.4.70.0100.00937.29
7.4.60.0070.01137.32
7.4.50.0130.00537.33
7.4.40.0130.00737.46
7.4.30.0110.00837.37
7.4.20.0170.00347.85
7.4.10.0120.00847.82
7.4.00.0100.00636.75
7.3.330.0060.00546.22
7.3.320.0080.00346.21
7.3.310.0030.00747.71
7.3.300.0100.00247.78
7.3.290.0110.00632.02
7.3.280.0110.00626.77
7.3.270.0090.01048.37
7.3.260.0100.00937.45
7.3.250.0100.00732.02
7.3.240.0100.00937.36
7.3.230.0150.00347.86
7.3.220.0140.00379.33
7.3.210.0090.00847.90
7.3.200.0090.00937.30
7.3.190.0090.01137.22
7.3.180.0130.00637.29
7.3.170.0120.00537.34
7.3.160.0110.00837.22
7.3.150.0140.00447.76
7.3.140.0190.00247.79
7.3.130.0100.01047.80
7.3.120.0090.00947.72
7.3.110.0040.01336.70
7.3.100.0090.00736.83
7.3.90.0120.00536.85
7.3.80.0110.00736.86
7.3.70.0110.00631.21
7.3.60.0110.00728.01
7.3.50.0090.00727.92
7.3.40.0100.00527.96
7.3.30.0110.00727.88
7.3.20.0090.00728.82
7.3.10.0120.00626.67
7.3.00.0110.00726.71
7.2.340.0160.00079.33
7.2.330.0080.00947.97
7.2.320.0120.00747.83
7.2.310.0140.00737.52
7.2.300.0160.00637.62
7.2.290.0120.00737.60
7.2.280.0100.01047.84
7.2.270.0130.00847.82
7.2.260.0100.00948.01
7.2.250.0150.00647.89
7.2.240.0140.00336.88
7.2.230.0080.00836.89
7.2.220.0110.00836.89
7.2.210.0110.00736.93
7.2.200.0110.00831.52
7.2.190.0080.00828.22
7.2.180.0080.00928.13
7.2.170.0070.00928.14
7.2.160.0090.00728.20
7.2.150.0120.00428.93
7.2.140.0120.00828.98
7.2.130.0110.00826.84
7.2.120.0100.00826.83
7.2.110.0240.00625.10
7.2.100.0260.00925.20
7.2.90.0510.00823.85
7.2.80.0380.00623.87
7.2.70.0390.01022.96
7.2.60.0340.00822.31
7.2.50.0400.00822.95
7.2.40.0340.00822.90
7.2.30.0350.00922.94
7.2.20.0380.00722.91
7.2.10.0340.00822.92
7.2.00.0420.00922.97
7.1.330.0150.00436.17
7.1.320.0180.01136.17
7.1.310.0160.00636.13
7.1.300.0070.00927.93
7.1.290.0110.00627.86
7.1.280.0080.00927.98
7.1.270.0100.00627.98
7.1.260.0100.00927.99
7.1.250.0110.00725.83
7.1.240.0120.00827.97
7.1.230.0310.00925.47
7.1.220.0280.00825.59
7.1.210.0480.00823.88
7.1.200.0310.00822.88
7.1.190.0370.00723.95
7.1.180.0430.00823.90
7.1.170.0500.00622.63
7.1.160.0390.00822.62
7.1.150.0440.00522.66
7.1.140.0330.00822.60
7.1.130.0400.00722.60
7.1.120.0410.00722.62
7.1.110.0370.00822.66
7.1.100.0400.00922.63
7.1.90.0440.00622.68
7.1.80.0390.00722.18
7.1.70.0540.00722.15
7.1.60.0430.00930.05
7.1.50.0520.01030.05
7.1.40.0450.00730.00
7.1.30.0430.00829.96
7.1.20.0430.00730.01
7.1.10.0400.00721.99
7.1.00.0370.00521.96
7.0.330.0090.01027.59
7.0.320.0160.00627.59
7.0.310.0440.00623.62
7.0.300.0410.00922.34
7.0.290.0450.01022.38
7.0.280.0340.00623.59
7.0.270.0420.00522.40
7.0.260.0440.00522.31
7.0.250.0450.00622.36
7.0.240.0430.00722.43
7.0.230.0410.01022.45
7.0.220.0440.00622.44
7.0.210.0390.00922.50
7.0.200.0430.00721.84
7.0.190.0410.00721.74
7.0.180.0370.00821.76
7.0.170.0330.01021.78
7.0.160.0400.00721.77
7.0.150.0390.00921.71
7.0.140.0370.00721.72
7.0.130.0370.00921.77
7.0.120.0370.00621.76
7.0.110.0620.00721.72
7.0.100.0370.00921.71
7.0.90.0360.00821.75
7.0.80.0320.00821.74
7.0.70.0340.00821.79
7.0.60.0360.01021.67
7.0.50.0330.00821.76
7.0.40.0370.00521.84
7.0.30.0330.00921.81
7.0.20.0310.00921.55
7.0.10.0340.00621.75
7.0.00.0330.00821.79
5.6.400.0090.01027.52
5.6.390.0120.00727.58
5.6.380.0110.00825.30
5.6.370.0110.01025.32
5.6.360.0120.01225.43
5.6.350.0090.01025.35
5.6.340.0130.00725.37
5.6.330.0130.01025.38
5.6.320.0130.00625.34
5.6.310.0140.00725.40
5.6.300.0130.01422.45
5.6.290.0130.01422.40
5.6.280.0150.01322.39
5.6.270.0150.01322.44
5.6.260.0130.01422.42
5.6.250.0130.01522.38
5.6.240.0130.01722.44
5.6.230.0110.01622.39
5.6.220.0140.01322.40
5.6.210.0150.01422.29
5.6.200.0140.01422.36
5.6.190.0130.01522.38
5.6.180.0140.01322.34
5.6.170.0110.01622.42
5.6.160.0150.01022.35
5.6.150.0130.01422.29
5.6.140.0150.01322.38
5.6.130.0140.01322.37
5.6.120.0140.01222.39
5.6.110.0160.01122.34
5.6.100.0150.01122.33
5.6.90.0140.01322.35
5.6.80.0130.01122.19
5.6.70.0140.01222.27
5.6.60.0120.01422.22
5.6.50.0110.01422.27
5.6.40.0140.01222.25
5.6.30.0140.01522.26
5.6.20.0130.01322.25
5.6.10.0120.01422.30
5.6.00.0120.01322.15

preferences:
54.56 ms | 403 KiB | 5 Q