Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86819 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 83382 invoked from network); 23 Jun 2015 21:52:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jun 2015 21:52:28 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.41 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.213.41 mail-yh0-f41.google.com Received: from [209.85.213.41] ([209.85.213.41:35953] helo=mail-yh0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C8/42-04861-A15D9855 for ; Tue, 23 Jun 2015 17:52:27 -0400 Received: by yhan67 with SMTP id n67so9471730yha.3 for ; Tue, 23 Jun 2015 14:52:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=aZ9WVOkMegUbja9ZbaBxMjHOtHFrlraJUIZw/4kY3CQ=; b=CPPht0p6dHXFpeyIHfREWsMWZ7WQoO8icBHXWhpnGo18w1sTwXFlUGCyer4KzYAOSk cCECsP3rZF3RPm/ZhMHz8Qv7bZH/SOfgLNnKJ+APFS/UtfBK8U4WsPhdkDrN0wa4iDjR IwykDrljnlX9TsTrxKQ8Fds+zspBg2dh4MoezEOrFolWqdqiso2UygY8q5E14d09vF6j Cg5yI98l1q/RJL72kpcNdWxF1nJfnd6FwwBY68QxBWvNM4OXG3shSkvtcOL1UGRf43Lh tpLsG0Gib2HoBkZrNFgnWTTFiftzVAgNnC5RQ5izRwEFSt7jx3Cogzn9d8Q242+cL0FR PcvQ== X-Received: by 10.129.98.87 with SMTP id w84mr8442809ywb.32.1435096344461; Tue, 23 Jun 2015 14:52:24 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.129.48.129 with HTTP; Tue, 23 Jun 2015 14:51:45 -0700 (PDT) In-Reply-To: References: Date: Wed, 24 Jun 2015 06:51:45 +0900 X-Google-Sender-Auth: vzOF31Icdf8wTtm4bM5Q6DSAYSU Message-ID: To: Anthony Ferrara Cc: Xinchen Hui , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a11471004d4885c051936676b Subject: Re: [PHP-DEV] Optimizing php_html_entities() From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a11471004d4885c051936676b Content-Type: text/plain; charset=UTF-8 Hi Anthony, I got it. On Wed, Jun 24, 2015 at 6:41 AM, Yasuo Ohgaki wrote: > On Wed, Jun 24, 2015 at 12:21 AM, Anthony Ferrara > 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