We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following code:
<?php $ipv6_test = array(); for ($i = 0; $i < 100000; $i++) { $ip = '0:'. str_repeat('0', 15 - strlen(bin2hex(random_bytes(6)))). ':'. bin2hex(random_bytes(2)). ':'. bin2hex(random_bytes(2)). ':'. bin2hex(random_bytes(2)). ':'. bin2hex(random_bytes(2)). ':'. bin2hex(random_bytes(4)); $ipv6_test[$ip] = true; } foreach ($ipv6_test as $ip => $exp) { $out = filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6); $out = $out!== false; if ($exp!= $out) { echo "$ip failed (expected ", $exp?"true":"false", ", got ", $out?"true":"false", ")\n"; } } ?>
Resulted in this output:
/nightly_php/php-src/ext/filter/logical_filters.c:825:14: runtime error: signed integer overflow: 208068286 * 16 cannot be represented in type 'int'
nightly
ubuntu 22.04
The text was updated successfully, but these errors were encountered:
Duplicate of #18309
Sorry, something went wrong.
No branches or pull requests
Description
The following code:
Resulted in this output:
PHP Version
nightly
Operating System
ubuntu 22.04
The text was updated successfully, but these errors were encountered: