3v4l.org

run code in 300+ PHP versions simultaneously
<?php $this = new Object(); $this->func = function($a) { echo "--{$a}--"; }; $this->func("hi"); $func = $this->func; $func("bye");
Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.23
Fatal error: Cannot re-assign $this in /in/SpQtv on line 2
Process exited with code 255.

preferences:
185.91 ms | 1399 KiB | 60 Q