Reference error on php 5.4 and typo