3v4l.org

run code in 200+ 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 - 7.2.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
array(1) { [0]=> string(4) "test" } string(1) "t"