- var_dump: documentation ( source)
- explode: documentation ( source)
- array_fill: documentation ( source)
<?php
function explodeDeluxe($string, $nrArgs)
{
return explode(' ', $string, $nrArgs) + array_fill(0, $nrArgs, null);
}
var_dump(explodeDeluxe('a b c', 2));