Use temp var instead of index of return value for php 5.3