3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'Convert spaces to dash and LowerCase with PHP'; $str_lower = strtolower($str); $separator = '-'; $str_replace = str_replace(' ', $separator, $str_lower); $wordwrap = wordwrap($str_lower, 1, $separator, 0); echo 'Original: ' . "\t" . $str . "\n"; echo 'str_lower: ' . "\t" . $str_lower . "\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.5.10.0090.00916.43
8.5.00.0110.01019.67
8.4.150.0030.00014.05
8.4.140.0130.00817.36
8.4.130.0150.00517.56
8.4.120.0090.00920.55
8.4.110.0150.00522.46
8.4.100.0110.00818.57
8.4.90.0150.00818.71
8.4.80.0070.00517.87
8.4.70.0070.00317.71
8.4.60.0110.00918.75
8.4.50.0040.00420.32
8.4.40.0030.01617.53
8.4.30.0100.01017.48
8.4.20.0070.01317.41
8.4.10.0100.00717.68
8.3.280.0140.00718.35
8.3.270.0070.01216.50
8.3.260.0110.00816.54
8.3.250.0110.00618.95
8.3.240.0140.00517.37
8.3.230.0100.00916.65
8.3.220.0040.00419.04
8.3.210.0060.00716.47
8.3.200.0060.00316.55
8.3.190.0060.00218.98
8.3.180.0120.00716.84
8.3.170.0140.00320.72
8.3.160.0120.00617.06
8.3.150.0110.00720.74
8.3.140.0090.00916.54
8.3.130.0090.00016.79
8.3.120.0080.00018.90
8.3.110.0150.00416.63
8.3.100.0100.00024.06
8.3.90.0070.01126.77
8.3.80.0090.00017.97
8.3.70.0090.00918.11
8.3.60.0110.00418.55
8.3.50.0050.00818.32
8.3.40.0040.01118.44
8.3.30.0110.00318.59
8.3.20.0040.00419.20
8.3.10.0000.00721.77
8.3.00.0040.00423.51
8.2.290.0080.01020.19
8.2.280.0060.00318.48
8.2.270.0060.01318.64
8.2.260.0000.00816.75
8.2.250.0030.00716.66
8.2.240.0030.01417.07
8.2.230.0040.01220.94
8.2.220.0060.00337.54
8.2.210.0040.00426.77
8.2.200.0100.00017.95
8.2.190.0150.00616.58
8.2.180.0060.00918.25
8.2.170.0140.00718.96
8.2.160.0100.00722.96
8.2.150.0080.00025.66
8.2.140.0070.00024.66
8.2.130.0070.00019.70
8.2.120.0070.00026.35
8.2.110.0030.00622.30
8.2.100.0080.00317.59
8.2.90.0000.00817.83
8.2.80.0000.00817.97
8.2.70.0040.00417.93
8.2.60.0030.00718.05
8.2.50.0050.00318.10
8.2.40.0060.00320.95
8.2.30.0030.00619.18
8.2.20.0050.00218.07
8.2.10.0040.00419.43
8.2.00.0040.00419.37
8.1.330.0100.00921.71
8.1.320.0110.01016.15
8.1.310.0120.00316.90
8.1.300.0080.00818.56
8.1.290.0030.00630.84
8.1.280.0100.00725.92
8.1.270.0040.00420.32
8.1.260.0070.00026.35
8.1.250.0080.00028.09
8.1.240.0060.00322.67
8.1.230.0110.00020.89
8.1.220.0080.00017.79
8.1.210.0040.00419.02
8.1.200.0050.00517.36
8.1.190.0000.00816.99
8.1.180.0000.00718.10
8.1.170.0000.00918.77
8.1.160.0040.00418.77
8.1.150.0000.00718.93
8.1.140.0040.00417.76
8.1.130.0000.00718.97
8.1.120.0070.00017.46
8.1.110.0080.00017.42
8.1.100.0000.00717.46
8.1.90.0040.00317.46
8.1.80.0040.00417.47
8.1.70.0030.00317.35
8.1.60.0000.00817.53
8.1.50.0020.00517.43
8.1.40.0070.00017.42
8.1.30.0000.00817.65
8.1.20.0070.00017.69
8.1.10.0020.00517.51
8.1.00.0030.00517.38
8.0.300.0000.00719.90
8.0.290.0060.00316.75
8.0.280.0050.00318.45
8.0.270.0020.00517.14
8.0.260.0000.00617.18
8.0.250.0030.00317.01
8.0.240.0060.00316.83
8.0.230.0000.00716.83
8.0.220.0000.00716.93
8.0.210.0040.00416.81
8.0.200.0030.00316.94
8.0.190.0000.00816.97
8.0.180.0070.00016.95
8.0.170.0100.00016.89
8.0.160.0040.00416.93
8.0.150.0070.00016.83
8.0.140.0030.00316.74
8.0.130.0000.00713.30
8.0.120.0030.00516.83
8.0.110.0000.00716.74
8.0.100.0040.00416.94
8.0.90.0030.00316.70
8.0.80.0060.00916.91
8.0.70.0040.00416.86
8.0.60.0000.00716.68
8.0.50.0040.00416.85
8.0.30.0100.00817.04
8.0.20.0130.00917.41
8.0.10.0020.00516.89
8.0.00.0080.00916.60
7.4.330.0040.00015.55
7.4.320.0000.00616.50
7.4.300.0090.00016.54
7.4.290.0030.00616.55
7.4.280.0070.00016.39
7.4.270.0000.00716.55
7.4.260.0030.00316.57
7.4.250.0030.00316.51
7.4.240.0000.00716.47
7.4.230.0040.00416.63
7.4.220.0040.00416.57
7.4.210.0090.00616.46
7.4.200.0000.00716.47
7.4.160.0080.00916.42
7.4.140.0090.01017.86
7.4.130.0120.00516.34
7.4.120.0090.00916.45
7.4.110.0090.00916.36
7.4.100.0070.01016.23
7.4.90.0080.01116.40
7.4.80.0030.01719.39
7.4.70.0170.00016.59
7.4.60.0040.01316.61
7.4.50.0100.00716.45
7.4.40.0090.00916.57
7.4.00.0040.01414.83
7.3.330.0080.00013.03
7.3.320.0060.00013.00
7.3.310.0000.00716.33
7.3.300.0040.00416.11
7.3.290.0040.00416.26
7.3.280.0080.01016.23
7.3.260.0090.00916.39
7.3.240.0120.01116.31
7.3.230.0030.01316.47
7.3.210.0060.01216.26
7.3.200.0040.01916.36
7.3.190.0060.00916.28
7.3.180.0100.00716.45
7.3.170.0070.01416.45
7.3.160.0090.00616.21
7.3.120.0090.00614.59
7.3.110.0030.01314.63
7.3.100.0070.00714.97
7.3.90.0090.00314.64
7.3.80.0100.00314.71
7.3.70.0070.01314.77
7.3.60.0030.00614.82
7.3.50.0030.00914.78
7.3.40.0120.00014.75
7.3.30.0080.00414.65
7.3.20.0060.01016.64
7.3.10.0140.00316.47
7.3.00.0060.00816.49
7.2.330.0100.01416.50
7.2.320.0150.00916.50
7.2.310.0120.00616.34
7.2.300.0140.00716.60
7.2.290.0100.00716.57
7.2.240.0000.01114.80
7.2.230.0070.00715.11
7.2.220.0070.00315.16
7.2.210.0090.00615.16
7.2.200.0050.00515.13
7.2.190.0060.00915.13
7.2.180.0000.01414.79
7.2.170.0000.01415.03
7.2.160.0060.00914.81
7.2.150.0040.01216.89
7.2.140.0060.00616.85
7.2.130.0050.00816.72
7.2.120.0050.01116.77
7.2.110.0080.00816.74
7.2.100.0050.01016.59
7.2.90.0020.01116.89
7.2.80.0080.01016.70
7.2.70.0110.01116.40
7.2.60.0110.00916.11
7.2.50.0120.00816.21
7.2.40.0080.01016.32
7.2.30.0110.00716.35
7.2.20.0100.00816.14
7.2.10.0110.01016.22
7.2.00.0100.01016.21
7.1.330.0030.00715.64
7.1.320.0040.01115.51
7.1.310.0030.01015.78
7.1.300.0070.00715.77
7.1.290.0120.00315.71
7.1.280.0030.01415.89
7.1.270.0110.00715.64
7.1.260.0130.00315.82
7.1.250.0050.00915.68
7.1.200.0210.00415.32
7.1.170.0170.00713.81
7.1.160.0180.00913.87
7.1.150.0240.00013.90
7.1.140.0200.00713.75
7.1.130.0120.01213.61
7.1.120.0210.01013.96
7.1.110.0210.00313.84
7.1.100.0200.00713.81
7.1.90.0130.01014.01
7.1.80.0160.00613.96
7.1.70.0190.01013.98
7.1.60.0320.01631.93
7.1.50.0520.01031.95
7.1.40.0340.01431.98
7.1.30.0370.01731.68
7.1.20.0700.01631.86
7.1.10.0280.00313.75
7.1.00.0200.00814.07

preferences:
32.26 ms | 403 KiB | 5 Q