<?php class X { public $call; public function __construct() { $this->call = function () { echo "x"; }; } public function call() { echo "y"; } } $object = new X; $call = $object->call; $call();
You have javascript disabled. You will not be able to edit any code.