3v4l.org

run code in 300+ 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:
53.66 ms | 402 KiB | 5 Q