Hi Anthony, I got it.
On Wed, Jun 24, 2015 at 6:41 AM, Yasuo Ohgaki <yohg...@ohgaki.net> wrote: > On Wed, Jun 24, 2015 at 12:21 AM, Anthony Ferrara <ircmax...@gmail.com> > wrote: > >> In addition, this breaks the contract, specifically when using scalar >> types. Because you're no longer going to error when the contract is >> broken (considering htmlspecialchars is documented as string:string). >> > > What do you mean by "break the contract". > "string" parameter is not a requirement/contract. > htmlspecialchars/htmlentities > just converts param to string. The patch does not change anything as you > can > see it from the phpt results. > [yohgaki@dev github-php-src]$ cat ../t.php <?php declare(strict_types=1); var_dump( htmlspecialchars(123) ); [yohgaki@dev github-php-src]$ ./php-bin ../t.php Fatal error: Uncaught TypeError: htmlspecialchars() expects parameter 1 to be string, integer given in /home/yohgaki/workspace/ext/git/oss/ php.net/t.php:4 Stack trace: #0 /home/yohgaki/workspace/ext/git/oss/php.net/t.php(4): htmlspecialchars(123) #1 {main} thrown in /home/yohgaki/workspace/ext/git/oss/php.net/t.php on line 4 I think this is massive breakage. It only happens in strict mode, though. Regards, -- Yasuo Ohgaki yohg...@ohgaki.net