First attempt to support php.net