3v4l.org

run code in 300+ PHP versions simultaneously
<?php $content = "<?"; $tokensOldContentLength = 0; $possibleOpenContent = substr($content, $tokensOldContentLength, 5); var_dump($possibleOpenContent); var_dump(substr('a', 2, 2));
Output for 8.0.1 - 8.0.19, 8.1.0 - 8.1.6
string(2) "<?" string(0) ""
Output for 7.4.0 - 7.4.29
string(2) "<?" bool(false)

preferences:
21.33 ms | 409 KiB | 5 Q