3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Func { public function __construct(){ echo 'construct'."\n"; } public function __invoke(){ echo 'invoke'."\n"; } public function __destruct(){ echo 'destruct'."\n"; } } $f = new Func(); $f(); echo 'exit before'."\n"; exit(); echo 'exit after'."\n"; var_dump($f);

preferences:
25.86 ms | 404 KiB | 5 Q