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(' ', 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.60.0150.00018.06
8.3.50.0140.00318.19
8.3.40.0040.01118.67
8.3.30.0040.01118.79
8.3.20.0040.00420.31
8.3.10.0040.00423.70
8.3.00.0000.00719.06
8.2.180.0160.00618.48
8.2.170.0070.00722.96
8.2.160.0110.00420.57
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0080.00020.97
8.2.110.0080.00322.20
8.2.100.0000.01220.39
8.2.90.0110.00019.09
8.2.80.0060.00317.97
8.2.70.0030.00617.50
8.2.60.0030.00618.05
8.2.50.0090.00018.07
8.2.40.0030.00520.96
8.2.30.0000.00718.11
8.2.20.0030.00617.58
8.2.10.0000.00718.02
8.2.00.0040.00417.48
8.1.270.0080.00023.89
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00324.05
8.1.230.0110.00019.02
8.1.220.0000.00817.74
8.1.210.0050.00318.77
8.1.200.0080.00417.23
8.1.190.0040.00417.10
8.1.180.0040.00418.10
8.1.170.0000.00718.45
8.1.160.0050.00222.00
8.1.150.0040.00418.57
8.1.140.0060.00317.29
8.1.130.0000.00717.84
8.1.120.0000.00717.41
8.1.110.0040.00417.39
8.1.100.0080.00017.34
8.1.90.0030.00717.30
8.1.80.0040.00417.42
8.1.70.0070.00017.34
8.1.60.0080.00017.54
8.1.50.0030.00517.33
8.1.40.0000.00817.50
8.1.30.0040.00417.59
8.1.20.0050.00317.54
8.1.10.0030.00517.52
8.1.00.0000.00817.45
8.0.300.0000.00718.77
8.0.290.0030.00616.75
8.0.280.0000.00718.48
8.0.270.0000.00717.16
8.0.260.0000.00617.21
8.0.250.0030.00316.79
8.0.240.0030.00316.89
8.0.230.0030.00316.88
8.0.220.0030.00316.75
8.0.210.0030.00316.84
8.0.200.0030.00316.88
8.0.190.0070.00016.92
8.0.180.0030.00316.79
8.0.170.0000.00816.88
8.0.160.0050.00316.76
8.0.150.0080.00016.78
8.0.140.0050.00316.71
8.0.130.0060.00013.31
8.0.120.0030.00516.72
8.0.110.0050.00316.70
8.0.100.0040.00416.76
8.0.90.0040.00416.77
8.0.80.0100.01116.75
8.0.70.0000.00816.88
8.0.60.0070.00016.86
8.0.50.0000.00816.79
8.0.30.0110.00816.91
8.0.20.0070.01417.40
8.0.10.0000.00716.89
8.0.00.0100.00816.85
7.4.330.0000.00415.00
7.4.320.0060.00016.43
7.4.300.0070.00016.50
7.4.290.0000.00716.48
7.4.280.0030.00516.46
7.4.270.0000.00816.42
7.4.260.0090.00016.42
7.4.250.0040.00416.40
7.4.240.0030.00316.46
7.4.230.0000.00716.55
7.4.220.0000.01816.55
7.4.210.0080.00516.48
7.4.200.0030.00316.64
7.4.190.0000.00816.58
7.4.160.0130.00716.33
7.4.150.0120.00917.40
7.4.140.0110.00717.86
7.4.130.0160.00316.43
7.4.120.0070.01016.49
7.4.110.0060.01116.47
7.4.100.0110.00616.32
7.4.90.0100.00716.61
7.4.80.0120.01219.39
7.4.70.0070.01116.39
7.4.60.0120.00616.37
7.4.50.0060.00316.53
7.4.40.0110.00616.28
7.4.30.0030.01316.50
7.4.00.0120.00015.01
7.3.330.0060.00013.16
7.3.320.0030.00313.04
7.3.310.0030.00316.07
7.3.300.0070.00016.08
7.3.290.0120.00916.19
7.3.280.0110.00716.16
7.3.270.0100.00717.40
7.3.260.0100.01116.15
7.3.250.0150.00216.30
7.3.240.0120.01216.43
7.3.230.0100.00616.39
7.3.210.0080.00816.25
7.3.200.0110.00519.39
7.3.190.0150.00616.21
7.3.180.0040.01116.23
7.3.170.0000.01416.27
7.3.160.0060.01016.26
7.3.120.0070.00714.95
7.3.10.0030.00616.46
7.3.00.0030.00716.62
7.2.330.0070.01116.52
7.2.320.0100.00716.68
7.2.310.0100.01016.46
7.2.300.0060.01216.61
7.2.290.0170.00416.36
7.2.130.0000.01716.54
7.2.120.0060.00616.62
7.2.110.0090.00616.55
7.2.100.0040.00816.79
7.2.90.0000.01216.62
7.2.80.0070.00716.43
7.2.70.0060.00616.86
7.2.60.0110.00016.81
7.2.50.0030.00616.51
7.2.40.0080.00416.45
7.2.30.0100.00716.78
7.2.20.0090.00316.78
7.2.10.0000.01416.88
7.2.00.0010.00818.06
7.1.250.0100.00715.88
7.1.100.0000.01018.11
7.1.70.0060.00316.76
7.1.60.0110.01419.70
7.1.50.0070.01016.87
7.1.00.0000.07722.48
7.0.200.0040.00816.78
7.0.140.0030.07022.09
7.0.60.0130.08020.02
7.0.50.0030.04317.97
7.0.40.0030.08320.06
7.0.30.0300.04020.30
7.0.20.0330.06020.09
7.0.10.0130.04020.09
7.0.00.0100.05320.23
5.6.280.0070.07021.04
5.6.210.0130.06720.52
5.6.200.0100.03718.25
5.6.190.0170.06720.35
5.6.180.0270.04720.77
5.6.170.0230.05320.39
5.6.160.0130.08020.52
5.6.150.0030.04318.15
5.6.140.0070.07318.23
5.6.130.0130.07318.18
5.6.120.0100.06720.97
5.6.110.0070.08321.11
5.6.100.0030.08721.11
5.6.90.0000.09321.07
5.6.80.0170.07720.38
5.5.350.0270.07320.47
5.5.340.0030.07318.00
5.5.330.0100.06320.39
5.5.320.0030.08320.31
5.5.310.0230.06320.23
5.5.300.0000.04318.06
5.5.290.0070.07717.95
5.5.280.0170.05720.65
5.5.270.0100.06720.87
5.5.260.0100.08320.76
5.5.250.0070.08320.79
5.5.240.0070.03720.16
5.4.450.0430.06019.59
5.4.440.0970.05719.39
5.4.430.0070.06019.47
5.4.420.0300.05319.33
5.4.410.1030.07319.57
5.4.400.0900.04719.26
5.4.390.0900.05019.14
5.4.380.0430.08318.70
5.4.370.0530.04018.79
5.4.360.0500.05018.47
5.4.350.0530.06718.76
5.4.340.0300.05718.79
5.4.320.0070.03812.50
5.4.310.0070.03812.50
5.4.300.0050.05712.50
5.4.290.0100.03812.50
5.4.280.0060.04112.40
5.4.270.0070.05112.40
5.4.260.0080.05312.40
5.4.250.0110.04912.39
5.4.240.0090.04912.40
5.4.230.0110.04912.39
5.4.220.0110.04612.39
5.4.210.0070.05112.39
5.4.200.0060.05512.39
5.4.190.0100.05012.38
5.4.180.0090.05412.38
5.4.170.0060.05512.39
5.4.160.0100.04512.39
5.4.150.0100.05712.39
5.4.140.0140.05612.07
5.4.130.0140.04612.06
5.4.120.0080.05412.02
5.4.110.0090.05212.02
5.4.100.0120.04512.01
5.4.90.0090.05212.01
5.4.80.0080.05612.01
5.4.70.0120.04912.01
5.4.60.0110.04312.01
5.4.50.0060.03712.01
5.4.40.0100.04512.00
5.4.30.0040.04012.00
5.4.20.0170.05012.00
5.4.10.0200.05111.99
5.4.00.0100.04711.48
5.3.290.0070.03912.80
5.3.280.0130.04612.71
5.3.270.0080.05612.72
5.3.260.0100.05412.72
5.3.250.0080.05412.72
5.3.240.0120.05012.72
5.3.230.0090.05012.71
5.3.220.0140.05412.68
5.3.210.0070.05512.68
5.3.200.0080.05312.68
5.3.190.0120.05112.68
5.3.180.0040.06512.68
5.3.170.0080.05712.66
5.3.160.0090.05612.67
5.3.150.0070.05712.68
5.3.140.0060.05812.66
5.3.130.0050.05812.66
5.3.120.0150.04912.66
5.3.110.0100.04312.66
5.3.100.0070.04012.12
5.3.90.0060.03812.09
5.3.80.0070.03612.09
5.3.70.0100.03312.09
5.3.60.0140.03012.07
5.3.50.0070.03512.02
5.3.40.0030.04012.02
5.3.30.0130.02911.98
5.3.20.0040.03811.76
5.3.10.0050.03711.73
5.3.00.0070.04711.72
5.2.170.0070.0299.21
5.2.160.0050.0309.21
5.2.150.0060.0309.21
5.2.140.0040.0329.21
5.2.130.0030.0329.17
5.2.120.0060.0349.17
5.2.110.0020.0329.18
5.2.100.0040.0329.18
5.2.90.0040.0329.17
5.2.80.0090.0449.16
5.2.70.0090.0419.16
5.2.60.0090.0419.13
5.2.50.0080.0399.10
5.2.40.0090.0389.07
5.2.30.0050.0439.04
5.2.20.0100.0349.03
5.2.10.0080.0368.94
5.2.00.0080.0398.80
5.1.60.0060.0348.09
5.1.50.0090.0308.08
5.1.40.0090.0368.06
5.1.30.0080.0378.41
5.1.20.0080.0368.43
5.1.10.0050.0388.16
5.1.00.0060.0398.16
5.0.50.0050.0286.64
5.0.40.0060.0276.50
5.0.30.0020.0456.31
5.0.20.0050.0266.27
5.0.10.0040.0286.25
5.0.00.0050.0406.25
4.4.90.0030.0234.77
4.4.80.0050.0204.75
4.4.70.0030.0174.75
4.4.60.0070.0134.75
4.4.50.0020.0174.77
4.4.40.0020.0274.71
4.4.30.0040.0164.76
4.4.20.0030.0174.84
4.4.10.0050.0164.85
4.4.00.0040.0264.76
4.3.110.0050.0154.67
4.3.100.0030.0164.66
4.3.90.0030.0154.63
4.3.80.0060.0264.59
4.3.70.0050.0144.63
4.3.60.0030.0164.63
4.3.50.0020.0234.63
4.3.40.0030.0324.54
4.3.30.0060.0213.30
4.3.20.0040.0243.27
4.3.10.0040.0233.24
4.3.00.0070.0237.91

preferences:
53.7 ms | 400 KiB | 5 Q