On 6/5/16 4:31 AM, Scott Arciszewski wrote:
> - memzero, memcmp, hex2bin
>
> I am not totally convinced that memzero and maybe memcmp names are
> good nor they should be there. Both would be very useful as operator
> on variables. Given the simplicity of the implementations, it could be
> very useful in many other areas in case this ext is not installed
>
IMO: memzero is fine; memcmp isn't that great.

memzero() stands out as unusual and interesting because PHP scripts don't usually get to manipulate memory, only variables. From the "Using" guide

    void \Sodium\memzero(&string $secret);

it looks like it's for zeroing strings.

What arg types does memzero() work with?

Does it check argument type?

Is it safe to use with opcache? Interned strings is an interesting case but there might be others.

Tom


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to