3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Mock of your Exchange class - you did not post the structure so its fairly basic. class Exchange { /** * @var string */ private $fooVar = 'foo'; public function foo(): string { return 'foo'; } } class YourExchange extends Exchange { public function bar(): string { return $this->foo(); } } var_dump((new YourExchange())->bar());

preferences:
32.05 ms | 404 KiB | 5 Q