3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $foo = __DIR__; var_dump(isset($foo[strlen($foo)]));
based on d5Fnh
Output for 5.3.0 - 7.2.6
bool(false)
Output for 4.3.3 - 4.4.9, 5.0.2 - 5.2.17
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/aFAJZ on line 3 bool(false)
Output for 5.0.0 - 5.0.1
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/aFAJZ on line 3 bool(true)
Output for 4.3.0 - 4.3.2
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/aFAJZ on line 3 Notice: Uninitialized string offset: 7 in /in/aFAJZ on line 5 bool(false)