3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $string = "hello$this$string has$some spaces"; var_dump(explode('$', $string));
Output for 7.1.0
Fatal error: Uncaught Error: Using $this when not in object context in /in/QPdZd:2 Stack trace: #0 {main} thrown in /in/QPdZd on line 2
Process exited with code 255.
Output for 5.0.4 - 7.0.14
Notice: Undefined variable: this in /in/QPdZd on line 2 Notice: Undefined variable: string in /in/QPdZd on line 2 Notice: Undefined variable: some in /in/QPdZd on line 2 array(1) { [0]=> string(16) "hello has spaces" }
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: this in /in/QPdZd on line 2 Notice: Undefined variable: string in /in/QPdZd on line 2 Notice: Undefined variable: some in /in/QPdZd on line 2 array(1) { [0]=> string(16) "hello has spaces" }