<?php final class DemoFile { public function run() { $test = 'Super'; $this->myCallback( function () use ($test) { return compact('test'); } ); } private function myCallback($callback) { var_dump($callback()); } } $d = new DemoFile(); $d->run();
You have javascript disabled. You will not be able to edit any code.