3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $test = array(); $test['one'] = 'two'; $false = false; var_dump($test['one'][$false]); $false = (string) $false; var_dump($test['one'][$false]);
Output for 5.4.5 - 5.6.28, 7.0.0 - 7.1.0
Notice: String offset cast occurred in /in/qY9il on line 5 string(1) "t" Warning: Illegal string offset '' in /in/qY9il on line 7 string(1) "t"
Output for hhvm-3.10.0 - 3.12.0
Notice: String offset cast occurred in /in/qY9il on line 5 string(1) "t" string(1) "t"
Output for 5.4.0 - 5.4.4
Notice: String offset cast occured in /in/qY9il on line 5 string(1) "t" Warning: Illegal string offset '' in /in/qY9il on line 7 string(1) "t"
Output for 4.3.0 - 5.3.29
string(1) "t" string(1) "t"