somethingSecret(); }; $inner(); } protected function somethingSecret() { echo "You figured it out\n"; } } $s = new Something(); $s->outer();