then just do `$p = array_filter($path_elements);`