I guess that's not the same result as PHP counterpart produces in this case.
Could you follow up with this question for full compatibility with PHP implementation?