3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr = array ( 0 => array ( $this => 3, // instead 0 => 3, 'name' => 'three', ), 1 => array ( $this => 5, // instead 0 => 5, 'name' => 'five', ), 2 => array ( $this => 7, // instead 0 => 7, 'name' => 'seven', ), ); print_r( $arr[0]['name']);
based on ih7dp
Output for 7.1.0 - 7.2.0
Fatal error: Uncaught Error: Using $this when not in object context in /in/EPLoS:5 Stack trace: #0 {main} thrown in /in/EPLoS on line 5
Process exited with code 255.
Output for 5.4.0 - 7.0.20
Notice: Undefined variable: this in /in/EPLoS on line 5 Notice: Undefined variable: this in /in/EPLoS on line 9 Notice: Undefined variable: this in /in/EPLoS on line 13 three