`$prefix = $rest = null` ?

Or just add an else to the if, and do this in here. This `list( ) = array( )`... construct is really weird in this case.