Hi Andrey,
On Wed, Jun 24, 2015 at 6:20 PM, Andrey Andreev wrote:
> On Wed, Jun 24, 2015 at 5:49 AM, Yasuo Ohgaki wrote:
> > Hi Xinchen,
> >
> > On Wed, Jun 24, 2015 at 11:42 AM, Xinchen Hui wrote:
> >
> >> and for the "age" usage you replied in github, I think the author of
> >> such codes sh
Hi,
On Wed, Jun 24, 2015 at 5:49 AM, Yasuo Ohgaki wrote:
> Hi Xinchen,
>
> On Wed, Jun 24, 2015 at 11:42 AM, Xinchen Hui wrote:
>
>> and for the "age" usage you replied in github, I think the author of
>> such codes should be aware, if it's only number, then instead of
>> htmlespcicalchars($age
Hey:
On Wed, Jun 24, 2015 at 3:13 PM, Yasuo Ohgaki wrote:
> Hi all,
>
> On Wed, Jun 24, 2015 at 12:20 PM, Yasuo Ohgaki wrote:
>>
>> On Wed, Jun 24, 2015 at 12:05 PM, Juan Basso wrote:
>>>
>>> Did you test the performance impact on strings? Since you changed how it
>>> works the impact can be p
Hi all,
On Wed, Jun 24, 2015 at 12:20 PM, Yasuo Ohgaki wrote:
> On Wed, Jun 24, 2015 at 12:05 PM, Juan Basso wrote:
>
>> Did you test the performance impact on strings? Since you changed how it
>> works the impact can be positive and maybe worth to make the method more
>> broad.
>
>
> It's a bi
Hi Anthony,
On Wed, Jun 24, 2015 at 12:00 PM, Yasuo Ohgaki wrote:
> On Wed, Jun 24, 2015 at 10:40 AM, Anthony Ferrara
> wrote:
>
>> >
>> > IMHO, escape/unescape/encode/decode/conversion function is better to
>> accept
>> > any types.
>> > HTML template may be separated script, but database code
Hi Juan,
On Wed, Jun 24, 2015 at 12:05 PM, Juan Basso wrote:
> Did you test the performance impact on strings? Since you changed how it
> works the impact can be positive and maybe worth to make the method more
> broad.
It's a bit slower (~3%) for 'abc' as input string. If I remove redundant
t
Yasuo,
Did you test the performance impact on strings? Since you changed how it
works the impact can be positive and maybe worth to make the method more
broad.
Juan Basso
On Jun 23, 2015 23:01, "Yasuo Ohgaki" wrote:
> Hi Anthony,
>
> On Wed, Jun 24, 2015 at 10:40 AM, Anthony Ferrara
> wrote:
>
Hi Anthony,
On Wed, Jun 24, 2015 at 10:40 AM, Anthony Ferrara
wrote:
> >
> > IMHO, escape/unescape/encode/decode/conversion function is better to
> accept
> > any types.
> > HTML template may be separated script, but database code etc may not.
> >
> > Writing code like
> >
> > > declare(strict_
Hi Xinchen,
On Wed, Jun 24, 2015 at 11:42 AM, Xinchen Hui wrote:
> and for the "age" usage you replied in github, I think the author of
> such codes should be aware, if it's only number, then instead of
> htmlespcicalchars($age), he should use echo $age directly... which is
> more faster.
>
T
Hey:
On Wed, Jun 24, 2015 at 10:35 AM, Yasuo Ohgaki wrote:
> Hi Xinchen,
>
> On Wed, Jun 24, 2015 at 11:31 AM, Xinchen Hui wrote:
>>
>>
>>
>>
>> On Wed, Jun 24, 2015 at 8:32 AM, Yasuo Ohgaki wrote:
>> > Hi Xinchen,
>> >
>> > On Tue, Jun 23, 2015 at 11:33 PM, Xinchen Hui wrote:
>> >>
>> >> But
Hi Xinchen,
On Wed, Jun 24, 2015 at 11:31 AM, Xinchen Hui wrote:
>
>
>
> On Wed, Jun 24, 2015 at 8:32 AM, Yasuo Ohgaki wrote:
> > Hi Xinchen,
> >
> > On Tue, Jun 23, 2015 at 11:33 PM, Xinchen Hui wrote:
> >>
> >> But passing an non-string to htmlspecialchars are not common used
> cases..
> >>
Hey:
On Wed, Jun 24, 2015 at 8:32 AM, Yasuo Ohgaki wrote:
> Hi Xinchen,
>
> On Tue, Jun 23, 2015 at 11:33 PM, Xinchen Hui wrote:
>>
>> But passing an non-string to htmlspecialchars are not common used cases..
>>
>> "optimize" not common used cases... will bring nothing to us..
>
>
> The reason
Yasuo,
>
> IMHO, escape/unescape/encode/decode/conversion function is better to accept
> any types.
> HTML template may be separated script, but database code etc may not.
>
> Writing code like
>
> declare(strict_types=1);
> $sql = 'SELECT * FROM '. pg_escape_identifier((string)$table). ' WHERE i
Hi Xinchen,
On Tue, Jun 23, 2015 at 11:33 PM, Xinchen Hui wrote:
> But passing an non-string to htmlspecialchars are not common used cases..
>
> "optimize" not common used cases... will bring nothing to us..
>
The reason why I looked into this in the first place is one of my friend
complained a
Hi all,
On Wed, Jun 24, 2015 at 6:51 AM, Yasuo Ohgaki wrote:
> 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
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 (c
Hi!
> Current php_html_entities() convert int/float/etc to string, then convert
> it.
> int/float/etc is not required to be escaped. Optimize it by simply
> converting them to string.
I'm not sure this is the case that is used frequently enough to actually
optimize for it in PHP code. If for part
Hi Anthony,
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 yo
Hi Xinchen,
On Tue, Jun 23, 2015 at 11:33 PM, Xinchen Hui wrote:
> But passing an non-string to htmlspecialchars are not common used cases..
>
> "optimize" not common used cases... will bring nothing to us..
>
The reason why I brought up this now is scalar type hint.
Before PHP7, people didn't
On Tue, Jun 23, 2015 at 10:33 AM, Xinchen Hui wrote:
> Hey:
>
> On Tue, Jun 23, 2015 at 7:37 PM, Yasuo Ohgaki wrote:
>> Hi all,
>>
>> I'm trying to optimize php_html_entities().
>> Since htmlspecialchars()/htmlentities() are sensitive function, I would
>> like to ask comments before merge.
>>
>>
Hey:
On Tue, Jun 23, 2015 at 7:37 PM, Yasuo Ohgaki wrote:
> Hi all,
>
> I'm trying to optimize php_html_entities().
> Since htmlspecialchars()/htmlentities() are sensitive function, I would
> like to ask comments before merge.
>
> https://github.com/php/php-src/pull/1356
>
> Current php_html_enti
21 matches
Mail list logo