// Created on savesnippets.com ยท https://savesnippets.com/t7eJKc0r1w4gpF $n % 2 === 0); print_r($evens); // [2, 4, 6] print_r($odds); // [1, 3, 5]