3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'abclkjabc'; $notRepeated = []; foreach (count_chars($string, 1) as $char => $count) { if ($count === 1) { $notRepeated[] = chr($char); } } var_export($notRepeated); echo "\nCount = " . count($notRepeated);

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.4.10.0120.00322.05
8.3.140.0110.00417.01
8.3.130.0040.00418.43
8.3.120.0040.00420.87
8.3.110.0030.00616.75
8.3.100.0000.00824.06
8.3.90.0050.00326.77
8.3.80.0000.01016.48
8.3.70.0110.00716.75
8.3.60.0040.01818.56
8.3.50.0070.00720.18
8.3.40.0110.00421.98
8.3.30.0030.01218.67
8.3.20.0000.00724.18
8.3.10.0050.00324.66
8.3.00.0080.00026.16
8.2.260.0140.00418.73
8.2.250.0000.00816.88
8.2.240.0030.00617.32
8.2.230.0090.00320.94
8.2.220.0030.00637.54
8.2.210.0040.00426.77
8.2.200.0030.00616.50
8.2.190.0110.00716.75
8.2.180.0110.00425.92
8.2.170.0140.00419.08
8.2.160.0110.00322.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00819.77
8.2.110.0040.00720.56
8.2.100.0090.00317.78
8.2.90.0050.00318.03
8.2.80.0000.00817.97
8.2.70.0060.00317.59
8.2.60.0040.00418.03
8.2.50.0050.00318.07
8.2.40.0080.00017.91
8.2.30.0040.00418.00
8.2.20.0040.00420.53
8.2.10.0000.00718.18
8.2.00.0000.00719.27
8.1.310.0050.00316.60
8.1.300.0040.00420.07
8.1.290.0030.00630.84
8.1.280.0060.00925.92
8.1.270.0040.00723.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00922.59
8.1.230.0100.00322.74
8.1.220.0040.00417.74
8.1.210.0040.00718.85
8.1.200.0040.00417.13
8.1.190.0020.00517.35
8.1.180.0060.00318.10
8.1.170.0060.00318.50
8.1.160.0030.00518.81
8.1.150.0070.00018.63
8.1.140.0000.00817.48
8.1.130.0000.00718.81
8.1.120.0040.00417.45
8.1.110.0070.00017.30
8.1.100.0040.00417.47
8.1.90.0000.00717.35
8.1.80.0160.00017.36
8.1.70.0110.00517.27
8.1.60.0130.00417.51
8.1.50.0120.00517.53
8.1.40.0140.00317.49
8.1.30.0130.00417.60
8.1.20.0120.00417.48
8.1.10.0110.00717.37
8.1.00.0040.01317.28
8.0.300.0080.00020.08
8.0.290.0040.00416.75
8.0.280.0000.00718.44
8.0.270.0070.00016.80
8.0.260.0000.00718.30
8.0.250.0030.00316.94
8.0.240.0050.00316.85
8.0.230.0040.00416.87
8.0.220.0000.00616.89
8.0.210.0100.00716.82
8.0.200.0080.00816.80
8.0.190.0040.01316.83
8.0.180.0120.00416.84
8.0.170.0120.00416.86
8.0.160.0180.00016.75
8.0.150.0040.01216.79
8.0.140.0110.00416.85
8.0.130.0090.00816.79
8.0.120.0070.01016.88
8.0.110.0110.00416.81
8.0.100.0140.00316.89
8.0.90.0150.00416.70
8.0.80.0080.00516.82
8.0.70.0100.00516.88
8.0.60.0130.00416.94
8.0.50.0130.00316.75
8.0.30.0080.00316.75
8.0.20.0060.00916.82
8.0.10.0030.00716.88
7.4.330.0050.00015.55
7.4.320.0030.00316.51
7.4.300.0030.00316.53
7.4.290.0120.00016.48
7.4.280.0070.00716.48
7.4.270.0120.00416.45
7.4.260.0040.00816.50
7.4.250.0040.00916.57
7.4.240.0110.00316.59
7.4.230.0120.00016.50
7.4.220.0040.00816.46
7.4.210.0090.00316.50
7.4.200.0080.00416.40
7.4.190.0090.00416.50
7.4.180.0120.00016.30
7.4.160.0110.00316.62
7.4.150.0040.00916.30
7.4.140.0110.00416.40
7.4.130.0110.00416.36
7.4.120.0120.00216.52
7.4.110.0110.00316.43
7.4.100.0100.00316.45
7.4.90.0150.00016.44
7.4.80.0090.00416.32
7.4.70.0090.00616.51
7.4.60.0110.00416.50
7.4.50.0150.00016.40
7.4.40.0120.00416.34
7.4.30.0140.00016.23
7.4.20.0090.00516.34
7.4.10.0100.00316.48
7.4.00.0070.00716.51

preferences:
27.64 ms | 403 KiB | 5 Q