Improved for upgrades from php <=5.3 to versions >=5.4