<?php
class DynamicMethodBox {
    private function selected(): int {
        return 123;
    }

    public function run(string $method): int {
        return $this->$method();
    }
}

$box = new DynamicMethodBox();
echo $box->run("selected") . "\n";
