Page MenuHomePhabricator
Paste P854

(An Untitled Masterwork)
ActivePublic

Authored by Mattflaschen-WMF on Jun 30 2015, 5:05 AM.
<?php
class Something {
public function outer() {
$inner = function () {
$this->somethingSecret();
};
$inner();
}
protected function somethingSecret() {
echo "You figured it out\n";
}
}
$s = new Something();
$s->outer();