Skip to content

Instantly share code, notes, and snippets.

<?php
class Functions {
public static function getScope() {
// Here I had to instantiate the class twice, or the static method would not be callable (???)
return ['Functions\Inner' => new \Functions\Inner((new \Function\Inner([]))::getScope()) ];
}
public function __construct($scope) {
if ($scope !== []) {
$this->scope = $scope;