3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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)); }
based on CXHjL
Output for hhvm-3.18.5 - 3.22.0, 7.0.0 - 7.3.1
Output for 5.6.0 - 5.6.30
Fatal error: Call to undefined function random_bytes() in /in/bcj88 on line 3
Process exited with code 255.