3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = ''; var_dump($str[0]); var_dump(current($str));
Output for 5.3.0 - 5.6.30, 7.0.0 - 7.1.7
Notice: Uninitialized string offset: 0 in /in/PsFFh on line 3 string(0) "" Warning: current() expects parameter 1 to be array, string given in /in/PsFFh on line 4 NULL
Output for hhvm-3.13.2 - 3.17.3
Notice: Uninitialized string offset: 0 in /in/PsFFh on line 3 string(0) "" Warning: Invalid operand type was used: expecting an array in /in/PsFFh on line 4 bool(false)
Output for hhvm-3.10.1 - 3.12.14
string(0) "" Warning: Invalid operand type was used: expecting an array in /in/PsFFh on line 4 bool(false)