3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $string = 'hi'; echo $string[$i];
based on O5hqr
Output for 5.4.5 - 7.2.0
Notice: Undefined variable: i in /in/hFG1f on line 5 Notice: String offset cast occurred in /in/hFG1f on line 5 h
Output for 5.4.0 - 5.4.4
Notice: Undefined variable: i in /in/hFG1f on line 5 Notice: String offset cast occured in /in/hFG1f on line 5 h
Output for 5.0.4 - 5.3.29
Notice: Undefined variable: i in /in/hFG1f on line 5 h
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: i in /in/hFG1f on line 5 h