changed logic for PHP 5.4 compatibility
excluded php 5.3 from testing