<?php class Session { protected $identifierMap = []; public function hasIdentifier($identifier, $className): bool { return isset($this->identifierMap[$this->getClassIdentifier($className)][$identifier]); } protected function getClassIdentifier($className): string { return $className; } } var_dump((new Session())->hasIdentifier('foo', 'bar'));
You have javascript disabled. You will not be able to edit any code.