Demo file User.php updated to support php 5.4