3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $header = array('test'); var_dump($header); var_dump($header[0]['class']); die(); if (isset($header[0]['class'])) { echo 'set'; } else { echo 'not set'; }
based on XJdKl
Output for 5.4.0 - 5.6.28, 7.0.0 - 7.1.0
array(1) { [0]=> string(4) "test" } Warning: Illegal string offset 'class' in /in/7aRTP on line 5 string(1) "t"
Output for 4.3.0 - 5.3.29, hhvm-3.10.0 - 3.12.0
array(1) { [0]=> string(4) "test" } string(1) "t"