<?php

var_dump(array_filter(array(4, 35, 0, 23, 0, 0, 5),function($x){return $x!=0;}));