3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo { function bar() { extract(array('this'=>'What the hell?')); var_dump($this); } } $f = new Foo; $f->bar();
Output for 7.1.0
Fatal error: Uncaught Error: Cannot re-assign $this in /in/32REc:6 Stack trace: #0 /in/32REc(6): extract(Array) #1 /in/32REc(13): Foo->bar() #2 {main} thrown in /in/32REc on line 6
Process exited with code 255.
Output for 5.2.15 - 5.2.17, 5.3.4 - 7.0.14
object(Foo)#1 (0) { }
Output for 4.3.0 - 5.2.14, 5.3.0 - 5.3.3
string(14) "What the hell?"