3v4l.org

run code in 500+ PHP versions simultaneously
<?php $something = [3, 2, 1, '2', 3, 6, 5, 1, 1]; $liste = []; foreach ($something as $value) { $liste[$value] = $value; } var_export($liste);

preferences:
71.3 ms | 1244 KiB | 5 Q