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)); $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.0030.01418.43
8.3.50.0120.01021.98
8.3.40.0150.00018.47
8.3.30.0140.00018.79
8.3.20.0080.00020.16
8.3.10.0080.00023.48
8.3.00.0050.00219.02
8.2.180.0090.00925.92
8.2.170.0100.00722.96
8.2.160.0070.00720.39
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0070.00026.16
8.2.120.0040.00420.83
8.2.110.0090.00022.14
8.2.100.0070.00320.52
8.2.90.0030.00619.10
8.2.80.0000.00817.97
8.2.70.0060.00317.63
8.2.60.0040.00418.04
8.2.50.0060.00318.07
8.2.40.0000.00921.05
8.2.30.0050.00318.27
8.2.20.0070.00017.67
8.2.10.0070.00018.11
8.2.00.0000.00817.80
8.1.280.0170.00325.92
8.1.270.0030.00623.85
8.1.260.0040.00426.35
8.1.250.0080.00628.09
8.1.240.0030.00623.96
8.1.230.0060.00619.08
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0040.00717.48
8.1.190.0040.00417.13
8.1.180.0040.00418.10
8.1.170.0060.00318.70
8.1.160.0060.00321.92
8.1.150.0000.00718.54
8.1.140.0040.00417.39
8.1.130.0070.00017.80
8.1.120.0000.00717.51
8.1.110.0040.00417.34
8.1.100.0000.00817.36
8.1.90.0030.00617.40
8.1.80.0030.00617.42
8.1.70.0030.00317.32
8.1.60.0040.00717.63
8.1.50.0060.00317.40
8.1.40.0000.00817.57
8.1.30.0000.00917.60
8.1.20.0000.00717.57
8.1.10.0030.00617.53
8.1.00.0040.00417.41
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0000.00718.42
8.0.270.0030.00317.15
8.0.260.0000.00717.24
8.0.250.0030.00316.93
8.0.240.0070.00016.98
8.0.230.0030.00516.91
8.0.220.0020.00516.79
8.0.210.0000.00816.82
8.0.200.0000.00616.93
8.0.190.0000.00816.75
8.0.180.0070.00016.89
8.0.170.0070.00016.95
8.0.160.0040.00416.89
8.0.150.0030.00316.83
8.0.140.0040.00416.83
8.0.130.0000.00513.30
8.0.120.0000.00916.78
8.0.110.0080.00016.88
8.0.100.0070.00016.75
8.0.90.0040.00416.95
8.0.80.0060.00916.92
8.0.70.0040.00416.84
8.0.60.0000.00716.87
8.0.50.0000.00816.70
8.0.30.0080.01317.06
8.0.20.0110.00717.40
8.0.10.0040.00416.97
8.0.00.0090.01116.78
7.4.330.0000.00515.00
7.4.320.0030.00316.54
7.4.300.0000.00616.45
7.4.290.0030.00316.57
7.4.280.0050.00316.43
7.4.270.0000.00716.60
7.4.260.0030.00516.43
7.4.250.0070.00016.52
7.4.240.0000.00716.55
7.4.230.0070.00016.68
7.4.220.0090.00816.55
7.4.210.0000.01416.49
7.4.200.0030.00316.44
7.4.190.0070.00016.76
7.4.160.0100.01016.57
7.4.150.0150.00817.40
7.4.140.0130.00417.86
7.4.130.0070.01016.47
7.4.120.0150.00516.49
7.4.110.0100.00616.46
7.4.100.0090.00916.46
7.4.90.0150.00316.36
7.4.80.0090.00619.39
7.4.70.0030.01416.47
7.4.60.0110.00716.37
7.4.50.0040.00416.45
7.4.40.0100.00716.45
7.4.30.0110.00516.62
7.4.00.0070.00715.16
7.3.330.0060.00013.25
7.3.320.0000.00613.27
7.3.310.0000.00716.19
7.3.300.0040.00416.36
7.3.290.0100.01016.26
7.3.280.0080.01116.30
7.3.270.0090.01217.40
7.3.260.0120.00616.31
7.3.250.0100.00716.49
7.3.240.0060.01216.45
7.3.230.0080.00816.50
7.3.210.0110.00916.34
7.3.200.0100.01019.39
7.3.190.0100.01016.57
7.3.180.0040.01116.55
7.3.170.0040.01216.33
7.3.160.0130.00316.43
7.3.120.0080.00414.90
7.3.10.0090.00616.76
7.3.00.0070.00716.80
7.2.330.0090.00916.47
7.2.320.0110.00716.58
7.2.310.0090.01116.44
7.2.300.0090.00916.36
7.2.290.0070.01316.86
7.2.130.0090.00317.00
7.2.120.0000.01816.65
7.2.110.0070.00317.04
7.2.100.0100.00317.09
7.2.90.0070.01016.87
7.2.80.0060.00916.78
7.2.70.0140.00016.72
7.2.60.0130.00316.98
7.2.50.0000.01417.08
7.2.40.0060.00617.04
7.2.30.0040.01116.64
7.2.20.0060.00916.97
7.2.10.0060.01216.61
7.2.00.0070.00718.16
7.1.250.0070.00715.73
7.1.100.0000.01518.14
7.1.70.0030.00516.83
7.1.60.0070.01519.70
7.1.50.0040.01916.87
7.1.00.0100.06322.58
7.0.200.0080.00416.63
7.0.140.0070.07321.95
7.0.60.0070.03720.02
7.0.50.0000.08317.91
7.0.40.0130.06720.13
7.0.30.0330.05720.19
7.0.20.0370.05020.23
7.0.10.0070.07320.16
7.0.00.0070.08320.05
5.6.280.0030.07320.82
5.6.210.0000.08720.77
5.6.200.0030.08018.16
5.6.190.0100.06320.61
5.6.180.0230.06020.59
5.6.170.0330.07020.47
5.6.160.0030.04320.43
5.6.150.0070.05318.17
5.6.140.0070.07718.14
5.6.130.0030.09018.14
5.6.120.0070.08721.02
5.6.110.0130.07320.99
5.6.100.0030.04021.01
5.6.90.0130.08020.98
5.6.80.0100.04020.41
5.5.350.0070.04320.39
5.5.340.0100.07017.93
5.5.330.0070.08020.23
5.5.320.0130.07320.27
5.5.310.0270.06020.28
5.5.300.0030.05718.01
5.5.290.0070.04017.95
5.5.280.0130.07720.77
5.5.270.0000.09020.61
5.5.260.0030.04020.76
5.5.250.0000.04720.55
5.5.240.2800.03020.16
5.4.450.0070.04719.36
5.4.440.0270.05019.45
5.4.430.0170.04019.47
5.4.420.0370.03719.47
5.4.410.0470.04719.17
5.4.400.0300.04019.17
5.4.390.0400.03719.14
5.4.380.0200.04718.78
5.4.370.0230.06318.75
5.4.360.0130.07318.78
5.4.350.0030.06318.77
5.4.340.0130.05018.78
5.4.320.0100.03212.51
5.4.310.0050.04112.50
5.4.300.0090.03612.50
5.4.290.0060.04312.50
5.4.280.0150.07012.40
5.4.270.0060.05112.39
5.4.260.0050.04512.40
5.4.250.0090.04312.39
5.4.240.0070.05712.40
5.4.230.0110.05012.39
5.4.220.0120.04912.39
5.4.210.0060.03812.39
5.4.200.0110.04512.39
5.4.190.0110.03512.39
5.4.180.0070.04312.38
5.4.170.0040.03912.40
5.4.160.0100.03312.39
5.4.150.0090.03412.38
5.4.140.0040.04012.07
5.4.130.0110.03912.06
5.4.120.0060.03612.02
5.4.110.0030.04012.01
5.4.100.0080.03612.01
5.4.90.0020.04212.01
5.4.80.0110.03612.02
5.4.70.0080.03412.01
5.4.60.0050.03612.01
5.4.50.0080.03312.01
5.4.40.0080.04012.00
5.4.30.0070.03611.99
5.4.20.0020.04211.99
5.4.10.0060.03611.99
5.4.00.0070.03511.48
5.3.290.0030.04712.80
5.3.280.0100.03712.70
5.3.270.0070.04012.72
5.3.260.0060.04012.72
5.3.250.0100.03412.72
5.3.240.0110.03712.71
5.3.230.0040.04312.70
5.3.220.0050.04312.68
5.3.210.0110.04412.68
5.3.200.0090.06712.68
5.3.190.0090.04712.68
5.3.180.0090.03812.67
5.3.170.0100.05312.67
5.3.160.0060.04812.68
5.3.150.0110.04712.67
5.3.140.0090.04912.66
5.3.130.0070.05412.66
5.3.120.0100.04712.66
5.3.110.0090.04812.66
5.3.100.0070.04712.12
5.3.90.0070.05012.09
5.3.80.0090.04612.09
5.3.70.0070.04812.09
5.3.60.0050.04912.07
5.3.50.0110.04312.02
5.3.40.0120.04012.02
5.3.30.0070.04611.98
5.3.20.0090.04411.77
5.3.10.0060.04811.72
5.3.00.0090.04411.71
5.2.170.0050.0419.21
5.2.160.0050.0429.22
5.2.150.0070.0409.22
5.2.140.0090.0389.21
5.2.130.0030.0439.18
5.2.120.0080.0369.17
5.2.110.0050.0389.18
5.2.100.0060.0409.18
5.2.90.0090.0309.18
5.2.80.0080.0379.17
5.2.70.0060.0399.18
5.2.60.0090.0329.12
5.2.50.0050.0369.10
5.2.40.0050.0359.07
5.2.30.0050.0359.05
5.2.20.0070.0329.04
5.2.10.0010.0338.94
5.2.00.0060.0388.81
5.1.60.0040.0328.09
5.1.50.0050.0268.08
5.1.40.0050.0258.06
5.1.30.0050.0308.41
5.1.20.0030.0378.43
5.1.10.0050.0288.16
5.1.00.0060.0288.16
5.0.50.0030.0246.64
5.0.40.0080.0286.50
5.0.30.0060.0446.31
5.0.20.0060.0286.27
5.0.10.0050.0296.26
5.0.00.0100.0376.25
4.4.90.0020.0194.78
4.4.80.0050.0174.75
4.4.70.0030.0164.75
4.4.60.0040.0174.76
4.4.50.0070.0184.77
4.4.40.0020.0274.70
4.4.30.0020.0164.76
4.4.20.0050.0154.84
4.4.10.0020.0184.84
4.4.00.0030.0264.76
4.3.110.0020.0174.67
4.3.100.0050.0134.66
4.3.90.0040.0154.63
4.3.80.0040.0244.58
4.3.70.0050.0144.63
4.3.60.0030.0154.63
4.3.50.0030.0184.63
4.3.40.0070.0294.54
4.3.30.0030.0223.30
4.3.20.0010.0243.27
4.3.10.0000.0253.24
4.3.00.0170.01316.92

preferences:
47.88 ms | 401 KiB | 5 Q