<?php class Foo { protected string $dbname; public function __construct(array $appdata) { $this->dbname = 'mydb_' . $appdata['id']; } public function debug(): string { return $this->dbname; } } $appdata = [ 'id' => $_ENV['USER'], ]; $foo = new Foo($appdata); var_dump($foo->debug());
You have javascript disabled. You will not be able to edit any code.