3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Test; class trick { function doit() { print_r(__CLASS__ . '\r\n'); } function doitagain() { print_r(get_class($this) . '\r\n'); } } $obj=new trick(); $obj->doit(); $obj->doitagain();

preferences:
31.65 ms | 402 KiB | 5 Q