- Output for 7.1.0 - 7.1.25, 7.2.0 - 7.2.13, 7.3.0 - 7.3.1
<?php
$needle = bin2hex(random_bytes(15));
$shortString = $needle . bin2hex(random_bytes(20));
$longString = bin2hex(random_bytes(500)) . $needle . bin2hex(random_bytes(500));
for ($i = 0; $i < 100000; $i++) {
0 === strncmp($shortString, $needle, strlen($needle));
}
for ($i = 0; $i < 100000; $i++) {
0 === strncmp($longString, $needle, strlen($needle));
}