rolling in changes from php-een