Fix examples to reflect behavior (of PHP and php.js implementation)