3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dxPointers = '1, 2, 3, 4, 5'; if (!is_array($dxPointers)) { $dxPointers = (string)$dxPointers === '' ? [] : str_split($dxPointers); } print_r($dxPointers);

preferences:
61.59 ms | 402 KiB | 5 Q