Backward compatibility for PHP 5.3

Added backward compatibility for PHP 5.3 and changed some styles.