3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "this is my my word with new word"; //echo count(str_word_count($string)); echo unique_word_count($string); function unique_word_count($string) { //$string = explode(' ', strtolower($string)); //$string = str_word_count($string, 1); $string = preg_split('\s', strtolower($string)); $words = array_unique($string); return count($words); }

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.3.40.0140.00718.61
8.3.30.0100.00319.08
8.3.20.0040.00420.35
8.3.10.0040.00423.71
8.3.00.0040.00419.07
8.2.170.0120.00322.96
8.2.160.0130.00020.47
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0000.00726.16
8.2.120.0000.00820.72
8.2.110.0100.00022.13
8.2.100.0000.01020.56
8.2.90.0040.00419.05
8.2.80.0000.00817.97
8.2.70.0060.00317.63
8.2.60.0050.00317.92
8.2.50.0080.00018.07
8.2.40.0000.00821.01
8.2.30.0030.00318.05
8.2.20.0050.00317.55
8.2.10.0000.00717.96
8.2.00.0040.00417.64
8.1.270.0040.00423.82
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0000.00923.89
8.1.230.0110.00018.97
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0030.00717.35
8.1.190.0030.00517.13
8.1.180.0040.00418.10
8.1.170.0000.00818.49
8.1.160.0100.00021.75
8.1.150.0000.00718.62
8.1.140.0080.00017.49
8.1.130.0070.00017.81
8.1.120.0070.00017.43
8.1.110.0020.00517.36
8.1.100.0030.00517.41
8.1.90.0040.00417.38
8.1.80.0030.00617.36
8.1.70.0070.00017.35
8.1.60.0050.00617.57
8.1.50.0030.00517.53
8.1.40.0060.00317.45
8.1.30.0040.00417.60
8.1.20.0030.00617.50
8.1.10.0040.00417.51
8.1.00.0000.00817.42
8.0.300.0040.00418.77
8.0.290.0000.00816.63
8.0.280.0030.00318.37
8.0.270.0070.00017.25
8.0.260.0040.00417.20
8.0.250.0070.00016.87
8.0.240.0030.00317.02
8.0.230.0040.00416.97
8.0.220.0070.00016.82
8.0.210.0070.00016.76
8.0.200.0060.00016.91
8.0.190.0030.00616.88
8.0.180.0000.00716.88
8.0.170.0090.00016.92
8.0.160.0030.00316.99
8.0.150.0020.00516.81
8.0.140.0000.00816.83
8.0.130.0060.00013.36
8.0.120.0040.00416.84
8.0.110.0040.00416.83
8.0.100.0030.00316.75
8.0.90.0070.00016.82
8.0.80.0040.01216.83
8.0.70.0000.00716.88
8.0.60.0050.00316.92
8.0.50.0080.00016.79
8.0.30.0110.00917.14
8.0.20.0080.01017.40
8.0.10.0020.00516.91
8.0.00.0110.00616.72
7.4.330.0040.00015.00
7.4.320.0000.00716.36
7.4.300.0000.00616.48
7.4.290.0000.00716.59
7.4.280.0040.00416.53
7.4.270.0070.00016.61
7.4.260.0030.00316.38
7.4.250.0000.00816.60
7.4.240.0000.00716.54
7.4.230.0020.00516.57
7.4.220.0090.00916.55
7.4.210.0090.00616.55
7.4.200.0070.00016.62
7.4.190.0040.00416.54
7.4.160.0090.01216.54
7.4.150.0090.00917.40
7.4.140.0080.00917.86
7.4.130.0140.00616.55
7.4.120.0060.01316.56
7.4.110.0130.01016.44
7.4.100.0140.00416.31
7.4.90.0160.00016.43
7.4.80.0150.00319.39
7.4.70.0000.01616.59
7.4.60.0110.00616.39
7.4.50.0000.00916.60
7.4.40.0110.00516.56
7.4.30.0090.00916.54
7.4.00.0090.00914.95
7.3.330.0050.00013.36
7.3.320.0060.00013.30
7.3.310.0000.00716.40
7.3.300.0040.00316.32
7.3.290.0100.01016.38
7.3.280.0130.00516.38
7.3.270.0100.01317.40
7.3.260.0100.00716.62
7.3.250.0090.00716.45
7.3.240.0070.01016.37
7.3.230.0100.00716.43
7.3.210.0070.01016.50
7.3.200.0100.01319.39
7.3.190.0100.01316.50
7.3.180.0120.00316.43
7.3.170.0050.01116.46
7.3.160.0090.00616.45
7.3.120.0100.00814.87
7.3.110.0110.00614.77
7.3.100.0070.00814.84
7.3.90.0070.00714.89
7.3.80.0060.00914.96
7.3.70.0030.01014.82
7.3.60.0080.00514.74
7.3.50.0060.00714.87
7.3.40.0070.00814.71
7.3.30.0050.00614.79
7.3.20.0080.00716.72
7.3.10.0100.00616.71
7.3.00.0090.00616.60
7.2.330.0080.01516.39
7.2.320.0090.00916.72
7.2.310.0170.00316.50
7.2.300.0170.00716.67
7.2.290.0170.00616.61
7.2.250.0100.00814.94
7.2.240.0050.01314.99
7.2.230.0030.01015.07
7.2.220.0070.00815.08
7.2.210.0080.00815.14
7.2.200.0070.00815.02
7.2.190.0070.00814.98
7.2.180.0050.00915.01
7.2.170.0070.00914.97
7.2.160.0090.00615.21
7.2.150.0040.00816.97
7.2.140.0090.00917.11
7.2.130.0050.00816.87
7.2.120.0030.01016.89
7.2.110.0040.01016.99
7.2.100.0080.00416.93
7.2.90.0020.01216.97
7.2.80.0080.00517.00
7.2.70.0060.00616.94
7.2.60.0050.00916.82
7.2.50.0030.00816.99
7.2.40.0020.01316.96
7.2.30.0020.01016.95
7.2.20.0070.00916.96
7.2.10.0030.00816.75
7.2.00.0070.00817.83
7.1.330.0050.00715.85
7.1.320.0030.00715.77
7.1.310.0060.01015.63
7.1.300.0020.01115.70
7.1.290.0080.00715.58
7.1.280.0080.00715.56
7.1.270.0050.00915.61
7.1.260.0070.00615.76
7.1.250.0040.00915.75
7.1.200.0140.00015.77
7.1.100.0030.01018.07
7.1.70.0000.01216.82
7.1.60.0110.01419.70
7.1.50.0040.01916.90
7.1.00.0030.07722.28
7.0.200.0030.01116.79
7.0.140.0000.07322.01
7.0.60.0070.04019.88
7.0.50.0070.05317.93
7.0.40.0070.06320.11
7.0.30.0170.07320.19
7.0.20.0270.06320.23
7.0.10.0030.04320.06
7.0.00.0070.04720.05
5.6.280.0030.07321.10
5.6.210.0070.08320.55
5.6.200.0100.07718.25
5.6.190.0070.07020.55
5.6.180.0170.04320.63
5.6.170.0100.04720.57
5.6.160.0070.08720.47
5.6.150.0070.07018.29
5.6.140.0070.07718.28
5.6.130.0130.07318.27
5.6.120.0170.07720.89
5.6.110.0100.04021.00
5.6.100.0100.07020.89
5.6.90.0100.08020.95
5.6.80.0070.08720.36
5.5.350.0070.08720.50
5.5.340.0030.03717.99
5.5.330.0100.04720.47
5.5.320.0030.05320.28
5.5.310.0230.07020.41
5.5.300.0030.07017.96
5.5.290.0030.06717.99
5.5.280.0130.07720.84
5.5.270.0030.06720.86
5.5.260.0230.05720.86
5.5.250.0170.06320.70
5.5.240.3900.03720.04
5.4.450.0270.04019.55
5.4.440.0100.03319.16
5.4.430.0430.03319.18
5.4.420.0200.04319.56
5.4.410.0370.04719.07
5.4.400.0870.03351.95
5.4.390.0530.04749.59
5.4.380.0230.04718.80
5.4.370.0030.06018.45
5.4.360.0130.05018.59
5.4.350.0130.05718.75
5.4.340.0170.05018.58
5.4.320.0080.03912.50
5.4.310.0030.03912.50
5.4.300.0120.04612.50
5.4.290.0080.04212.50
5.4.280.0080.04412.40
5.4.270.0060.05212.40
5.4.260.0070.04412.39
5.4.250.0050.04312.40
5.4.240.0080.04412.40
5.4.230.0090.05112.39
5.4.220.0060.05412.39
5.4.210.0080.05012.39
5.4.200.0070.05412.39
5.4.190.0050.04712.38
5.4.180.0080.03812.38
5.4.170.0070.03712.39
5.4.160.0060.03812.39
5.4.150.0070.03512.39
5.4.140.0060.04112.07
5.4.130.0050.03712.06
5.4.120.0080.03312.02
5.4.110.0100.03712.02
5.4.100.0090.03412.01
5.4.90.0070.03812.01
5.4.80.0040.04112.02
5.4.70.0060.04712.01
5.4.60.0080.03512.00
5.4.50.0060.03812.01
5.4.40.0090.03512.00
5.4.30.0040.05411.99
5.4.20.0060.05311.99
5.4.10.0080.05112.00
5.4.00.0100.05911.48
5.3.290.0100.03812.80
5.3.280.0070.05812.71
5.3.270.0090.04212.72
5.3.260.0080.04012.72
5.3.250.0090.03612.72
5.3.240.0120.04112.72
5.3.230.0080.03812.71
5.3.220.0130.03112.68
5.3.210.0070.04112.68
5.3.200.0060.03712.68
5.3.190.0050.03912.68
5.3.180.0060.03712.68
5.3.170.0100.06212.66
5.3.160.0080.05212.67
5.3.150.0090.05012.68
5.3.140.0060.05112.66
5.3.130.0090.05112.66
5.3.120.0100.04812.66
5.3.110.0110.06012.66
5.3.100.0040.05312.12
5.3.90.0050.05812.10
5.3.80.0100.04612.09
5.3.70.0070.04012.09
5.3.60.0060.04212.07
5.3.50.0090.04612.02
5.3.40.0120.04112.02
5.3.30.0140.07211.97
5.3.20.0080.05611.76
5.3.10.0090.05811.73
5.3.00.0090.05711.71
5.2.170.0040.0469.22
5.2.160.0130.0399.22
5.2.150.0050.0389.21
5.2.140.0060.0329.21
5.2.130.0050.0319.17
5.2.120.0060.0299.17
5.2.110.0070.0409.18
5.2.100.0060.0319.17
5.2.90.0050.0289.18
5.2.80.0050.0359.17
5.2.70.0030.0349.17
5.2.60.0030.0329.13
5.2.50.0070.0289.09
5.2.40.0030.0309.07
5.2.30.0040.0309.04
5.2.20.0070.0279.03
5.2.10.0030.0368.94
5.2.00.0070.0408.80
5.1.60.0090.0238.09
5.1.50.0060.0278.08
5.1.40.0050.0298.06
5.1.30.0050.0278.41
5.1.20.0030.0328.43
5.1.10.0030.0308.17
5.1.00.0040.0358.16
5.0.50.0080.0336.63
5.0.40.0050.0336.50
5.0.30.0060.0406.31
5.0.20.0030.0286.27
5.0.10.0030.0296.25
5.0.00.0040.0316.25
4.4.90.0050.0214.77
4.4.80.0020.0184.75
4.4.70.0010.0184.75
4.4.60.0020.0174.75
4.4.50.0030.0164.77
4.4.40.0040.0314.71
4.4.30.0020.0234.76
4.4.20.0060.0164.85
4.4.10.0040.0224.85
4.4.00.0100.0324.76
4.3.110.0020.0254.67
4.3.100.0050.0164.67
4.3.90.0040.0174.63
4.3.80.0000.0294.59
4.3.70.0040.0214.63
4.3.60.0090.0214.62
4.3.50.0080.0264.62
4.3.40.0020.0364.54
4.3.30.0020.0213.30
4.3.20.0030.0223.28
4.3.10.0040.0253.24
4.3.00.0170.02046.74

preferences:
37.4 ms | 400 KiB | 5 Q