@ 2014-02-20T15:25:19Z <?php
$different_values = array();
for($i=0; $i<10; $i++){
$different_values = uniqid('test-');
}
var_dump( count(array_unique($different_values)) );
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 7.2.0 Warning: array_unique() expects parameter 1 to be array, string given in /in/cDrf6 on line 7
Warning: count(): Parameter must be an array or an object that implements Countable in /in/cDrf6 on line 7
int(0)
Output for 5.3.0 - 5.3.29 , 5.4.0 - 5.4.45 , 5.5.24 - 5.5.35 , 5.6.8 - 5.6.28 , 7.0.0 - 7.0.20 , 7.1.0 - 7.1.7 Warning: array_unique() expects parameter 1 to be array, string given in /in/cDrf6 on line 7
int(0)
Output for 4.3.2 - 4.3.11 , 4.4.0 - 4.4.9 , 5.0.0 - 5.0.5 , 5.1.0 - 5.1.6 , 5.2.0 - 5.2.17 Warning: array_unique(): The argument should be an array in /in/cDrf6 on line 7
int(1)
Output for 4.3.0 - 4.3.1 Warning: array_unique() [http://www.php.net/function.array-unique]: The argument should be an array in /in/cDrf6 on line 7
int(1)
preferences:dark mode live preview
111.92 ms | 401 KiB | 174 Q