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 str_word_count($string); function unique_word_count($string) { $string = explode(' ', $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.0070.00718.68
8.3.30.0090.00919.14
8.3.20.0040.00420.04
8.3.10.0050.00323.66
8.3.00.0090.00020.79
8.2.170.0070.01022.96
8.2.160.0100.00320.46
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0070.00026.16
8.2.120.0040.00420.87
8.2.110.0060.00322.25
8.2.100.0080.00419.64
8.2.90.0000.00919.22
8.2.80.0000.00817.97
8.2.70.0090.00017.63
8.2.60.0040.00418.05
8.2.50.0060.00318.07
8.2.40.0040.00419.95
8.2.30.0000.00718.26
8.2.20.0030.00517.55
8.2.10.0000.00817.90
8.2.00.0000.00717.51
8.1.270.0040.00423.82
8.1.260.0080.00026.35
8.1.250.0000.00728.09
8.1.240.0030.00521.96
8.1.230.0060.00619.16
8.1.220.0050.00317.74
8.1.210.0030.00618.77
8.1.200.0030.00617.13
8.1.190.0040.00417.23
8.1.180.0040.00418.10
8.1.170.0050.00318.47
8.1.160.0070.00021.85
8.1.150.0000.00718.57
8.1.140.0070.00317.29
8.1.130.0030.00317.81
8.1.120.0040.00417.44
8.1.110.0020.00517.34
8.1.100.0040.00417.34
8.1.90.0040.00417.45
8.1.80.0040.00417.27
8.1.70.0000.00717.37
8.1.60.0040.00817.39
8.1.50.0000.00817.37
8.1.40.0000.00917.30
8.1.30.0040.00417.52
8.1.20.0060.00317.47
8.1.10.0000.00717.46
8.1.00.0020.00517.40
8.0.300.0000.00718.77
8.0.290.0040.00417.18
8.0.280.0000.00718.53
8.0.270.0000.00717.18
8.0.260.0000.00717.17
8.0.250.0030.00316.84
8.0.240.0030.00316.95
8.0.230.0080.00016.90
8.0.220.0030.00316.76
8.0.210.0080.00016.85
8.0.200.0030.00316.91
8.0.190.0000.00816.76
8.0.180.0040.00416.77
8.0.170.0050.00316.87
8.0.160.0030.00316.70
8.0.150.0000.00716.65
8.0.140.0040.00416.67
8.0.130.0000.00513.24
8.0.120.0040.00416.74
8.0.110.0040.00416.88
8.0.100.0000.00716.77
8.0.90.0040.00416.65
8.0.80.0090.00616.77
8.0.70.0000.00716.86
8.0.60.0020.00516.67
8.0.50.0050.00316.67
8.0.30.0060.01216.98
8.0.20.0060.01317.40
8.0.10.0040.00416.94
8.0.00.0050.01216.77
7.4.330.0020.00215.00
7.4.320.0060.00016.53
7.4.300.0040.00416.29
7.4.290.0030.00316.50
7.4.280.0040.00416.52
7.4.270.0030.00516.46
7.4.260.0060.00016.40
7.4.250.0030.00516.49
7.4.240.0050.00216.43
7.4.230.0030.00316.27
7.4.220.0080.01716.54
7.4.210.0060.00916.39
7.4.200.0040.00416.43
7.4.190.0030.00416.59
7.4.160.0120.00316.55
7.4.150.0150.00317.40
7.4.140.0150.00617.86
7.4.130.0110.00916.30
7.4.120.0090.00816.40
7.4.110.0130.00316.58
7.4.100.0090.00916.49
7.4.90.0090.00916.31
7.4.80.0120.00619.39
7.4.70.0190.00416.38
7.4.60.0030.01516.57
7.4.50.0000.00516.32
7.4.40.0030.01816.32
7.4.30.0140.00516.45
7.4.10.0070.01014.98
7.4.00.0060.00915.08
7.3.330.0030.00313.20
7.3.320.0030.00313.13
7.3.310.0060.00016.13
7.3.300.0030.00316.04
7.3.290.0080.00616.11
7.3.280.0070.01116.17
7.3.270.0180.00617.40
7.3.260.0080.00816.48
7.3.250.0070.01016.13
7.3.240.0140.01016.21
7.3.230.0080.00816.39
7.3.210.0000.01816.46
7.3.200.0100.00719.39
7.3.190.0070.01016.25
7.3.180.0140.00316.22
7.3.170.0090.00616.27
7.3.160.0060.00916.16
7.3.130.0160.00014.75
7.3.120.0030.01214.48
7.3.110.0040.01114.51
7.3.100.0070.00714.83
7.3.90.0030.00614.55
7.3.80.0000.01614.37
7.3.70.0100.00314.60
7.3.60.0120.00314.81
7.3.50.0060.00914.64
7.3.40.0050.00314.82
7.3.30.0100.00314.67
7.3.20.0070.00316.20
7.3.10.0120.00616.34
7.3.00.0100.00616.70
7.2.330.0060.01016.67
7.2.320.0110.01116.34
7.2.310.0090.00616.64
7.2.300.0090.01216.46
7.2.290.0210.00016.54
7.2.260.0110.00714.79
7.2.250.0040.01415.11
7.2.240.0040.00814.95
7.2.230.0070.01114.79
7.2.220.0100.00714.55
7.2.210.0040.00814.95
7.2.200.0070.00714.87
7.2.190.0030.01014.88
7.2.180.0060.00614.89
7.2.170.0050.00514.81
7.2.160.0000.00915.03
7.2.150.0080.00416.41
7.2.140.0080.00416.84
7.2.130.0100.00316.49
7.2.120.0090.00616.79
7.2.110.0090.00316.64
7.2.100.0000.01616.82
7.2.90.0100.00316.77
7.2.80.0100.00716.86
7.2.70.0000.01316.74
7.2.60.0030.01016.83
7.2.50.0060.00616.82
7.2.40.0030.00716.68
7.2.30.0110.00416.93
7.2.20.0060.00616.81
7.2.10.0000.01516.96
7.2.00.0060.00817.90
7.1.330.0030.01015.56
7.1.320.0070.00715.59
7.1.310.0000.01515.51
7.1.300.0000.01415.72
7.1.290.0030.01215.82
7.1.280.0070.00715.72
7.1.270.0060.00315.65
7.1.260.0070.01015.80
7.1.250.0090.00315.55
7.1.240.0090.00615.70
7.1.230.0000.01315.70
7.1.220.0040.01115.84
7.1.210.0030.00715.41
7.1.200.0070.00715.70
7.1.190.0030.01015.79
7.1.180.0040.00815.72
7.1.170.0090.00015.71
7.1.160.0110.00015.82
7.1.150.0090.00615.80
7.1.140.0040.00715.78
7.1.130.0100.00315.48
7.1.120.0030.00915.71
7.1.110.0100.00315.83
7.1.100.0030.00816.79
7.1.90.0060.00915.84
7.1.80.0090.00315.96
7.1.70.0030.00516.33
7.1.60.0070.01217.75
7.1.50.0130.00525.34
7.1.40.0000.00915.61
7.1.30.0040.01115.78
7.1.20.0100.00315.71
7.1.10.0000.01415.88
7.1.00.0080.03618.86
7.0.330.0110.00715.52
7.0.320.0120.00315.25
7.0.310.0070.01015.39
7.0.300.0090.00415.38
7.0.290.0060.00615.29
7.0.280.0040.00415.45
7.0.270.0040.01115.11
7.0.260.0040.00715.25
7.0.250.0070.00715.29
7.0.240.0100.00715.41
7.0.230.0100.00615.23
7.0.220.0000.01315.16
7.0.210.0030.00615.17
7.0.200.0030.00716.04
7.0.190.0030.00615.40
7.0.180.0120.00315.41
7.0.170.0100.00715.40
7.0.160.0040.00815.40
7.0.150.0040.00715.16
7.0.140.0040.04018.84
7.0.130.0060.00915.56
7.0.120.0110.00315.31
7.0.110.0060.00315.09
7.0.100.0070.00315.23
7.0.90.0030.01015.46
7.0.80.0070.00715.38
7.0.70.0050.00915.16
7.0.60.0060.02617.58
7.0.50.0100.04316.71
7.0.40.0030.02716.75
7.0.30.0200.04016.70
7.0.20.0220.02016.78
7.0.10.0210.03316.71
7.0.00.0130.02816.95
5.6.400.0040.01114.06
5.6.390.0040.01414.16
5.6.380.0040.01114.05
5.6.370.0070.00714.25
5.6.360.0060.00614.19
5.6.350.0030.01314.13
5.6.340.0070.00714.20
5.6.330.0000.01414.13
5.6.320.0110.00314.34
5.6.310.0040.01114.05
5.6.300.0030.01014.24
5.6.290.0000.01314.14
5.6.280.0050.03817.83
5.6.270.0090.00014.17
5.6.260.0070.00414.36
5.6.250.0030.00714.26
5.6.240.0100.00614.25
5.6.230.0070.00714.38
5.6.220.0000.01514.11
5.6.210.0120.03817.39
5.6.200.0070.04316.22
5.6.190.0100.03017.30
5.6.180.0130.02517.26
5.6.170.0130.02817.47
5.6.160.0060.02617.44
5.6.150.0030.04516.19
5.6.140.0050.02316.30
5.6.130.0070.03116.30
5.6.120.0050.04617.73
5.6.110.0050.02517.58
5.6.100.0060.02717.67
5.6.90.0050.03217.57
5.6.80.0060.03217.19
5.6.70.1820.02717.39
5.6.60.0120.00314.17
5.6.50.0070.01014.42
5.6.40.0150.00014.11
5.6.30.0060.00914.18
5.6.20.0000.01314.26
5.6.10.0040.00814.27
5.6.00.0040.01114.12
5.5.380.0120.00014.03
5.5.370.0070.00314.33
5.5.360.0070.00314.16
5.5.350.1840.02117.23
5.5.340.0070.04016.06
5.5.330.0120.04517.02
5.5.320.0090.03917.04
5.5.310.0120.03017.31
5.5.300.0110.04015.98
5.5.290.0070.03515.96
5.5.280.0100.03817.44
5.5.270.0060.02617.54
5.5.260.0050.03017.37
5.5.250.0070.03817.51
5.5.240.0020.04617.13
5.5.230.0060.00614.08
5.5.220.0090.00614.14
5.5.210.0030.00914.27
5.5.200.0110.00413.85
5.5.190.0000.00913.87
5.5.180.0040.00714.03
5.5.170.0040.00814.17
5.5.160.0060.00814.23
5.5.150.0040.00813.89
5.5.140.0060.00914.17
5.5.130.0070.01014.36
5.5.120.0080.00814.22
5.5.110.0080.01114.03
5.5.100.0060.00614.21
5.5.90.0100.00013.92
5.5.80.0100.00314.01
5.5.70.0000.01213.97
5.5.60.0060.00913.93
5.5.50.0150.00314.13
5.5.40.0050.00913.80
5.5.30.0030.01014.19
5.5.20.0090.00914.09
5.5.10.0040.01514.06
5.5.00.0100.00614.14
5.4.450.1600.02215.45
5.4.440.1970.02515.56
5.4.430.1650.01815.53
5.4.420.1920.02915.39
5.4.410.1630.02315.42
5.4.400.1600.02215.37
5.4.390.1630.02115.22
5.4.380.1600.02215.22
5.4.370.1610.02115.41
5.4.360.1680.02015.39
5.4.350.1680.02315.31
5.4.340.1630.02015.41
5.4.330.0000.00611.58
5.4.320.1890.02515.30
5.4.310.1650.02215.34
5.4.300.1730.02315.33
5.4.290.1530.02215.40
5.4.280.1550.02315.36
5.4.270.1580.02015.29
5.4.260.1670.02315.37
5.4.250.1950.02515.40
5.4.240.1650.02015.36
5.4.230.1220.02215.28
5.4.220.1620.02615.39
5.4.210.1970.02615.40
5.4.200.1600.02415.28
5.4.190.1600.02215.36
5.4.180.0020.02415.37
5.4.170.1670.02415.28
5.4.160.1630.02315.21
5.4.150.1700.02515.26
5.4.140.1710.02414.04
5.4.130.1970.01713.93
5.4.120.1670.01813.94
5.4.110.1750.01714.07
5.4.100.1700.02313.88
5.4.90.1670.02013.88
5.4.80.1590.01613.97
5.4.70.0070.02013.96
5.4.60.0070.03413.87
5.4.50.1790.02214.03
5.4.40.1830.02614.04
5.4.30.1710.01714.06
5.4.20.1630.02514.05
5.4.10.1940.02014.00
5.4.00.1860.02313.84
5.3.290.1650.02313.12
5.3.280.1610.02113.07
5.3.270.1900.02013.20
5.3.260.1980.02313.13
5.3.250.1730.01913.14
5.3.240.1720.02213.14
5.3.230.1790.02513.04
5.3.220.1930.02313.07
5.3.210.1620.02213.08
5.3.200.1590.01713.11
5.3.190.1650.02113.06
5.3.180.1850.02513.03
5.3.170.0000.02413.15
5.3.160.0980.02513.05
5.3.150.1230.02313.07
5.3.140.1660.02113.11
5.3.130.1670.02213.07
5.3.120.1700.01813.06
5.3.110.1620.02113.12
5.3.100.1720.01712.88
5.3.90.1550.02212.76
5.3.80.1650.01712.75
5.3.70.1690.01812.84
5.3.60.1520.01912.90
5.3.50.1650.01812.75
5.3.40.1630.02212.77
5.3.30.1640.02212.78
5.3.20.1700.02012.58
5.3.10.1620.02312.71
5.3.00.1660.02212.56
5.2.170.2730.03011.24
5.2.160.2730.02711.26
5.2.150.2900.03011.05
5.2.140.2670.03311.14
5.2.130.2470.03011.01
5.2.120.2730.03011.09
5.2.110.3030.03311.10
5.2.100.2700.03011.00
5.2.90.3000.03311.09
5.2.80.3130.03011.17
5.2.70.2770.03011.02
5.2.60.3130.04011.21
5.2.50.2670.03310.99
5.2.40.2270.02710.91
5.2.30.2170.03010.88
5.2.20.2200.03010.87
5.2.10.2530.03310.86
5.2.00.2270.02710.62
5.1.60.2170.02310.11
5.1.50.2530.02710.05
5.1.40.2130.03010.20
5.1.30.2100.03010.27
5.1.20.2300.03010.27
5.1.10.2100.02710.16
5.1.00.1930.02310.15
5.0.50.1400.0208.66
5.0.40.1230.0238.57
5.0.30.1330.0378.57
5.0.20.1100.0178.57
5.0.10.1130.0178.57
5.0.00.1070.0338.57
4.4.90.1130.0108.63
4.4.80.1370.0178.63
4.4.70.1270.0178.57
4.4.60.1230.0208.57
4.4.50.0900.0238.57
4.4.40.1170.0238.57
4.4.30.1070.0178.57
4.4.20.1000.0178.57
4.4.10.1130.0108.57
4.4.00.1100.0238.57
4.3.110.1130.0138.57
4.3.100.1130.0138.57
4.3.90.1170.0108.57
4.3.80.1030.0278.57
4.3.70.1130.0138.57
4.3.60.1070.0178.57
4.3.50.1000.0208.57
4.3.40.1100.0308.57
4.3.30.0570.0138.57
4.3.20.0530.0178.57
4.3.10.0570.0208.57
4.3.00.0600.0138.57

preferences:
47.26 ms | 404 KiB | 6 Q