class name (SsaPropOptimizer). */ public array $stableObjects = []; /** Map of hoisted property refs: objName => [propName => true] (SsaPropOptimizer). */ public array $hoistedProps = []; /** Map of properties that must not be hoisted: objName => [propName|'*' => true] (SsaPropOptimizer). */ public array $unsafeObjectProps = []; /** * @var array */ public array $objects = []; /** @var array Native Object pointer variable => fully-qualified class name. */ public array $nativeObjects = []; /** * Native pointer variables proven non-null at the current parse point. * * Non-null Native parameters enter this set after their single function * entry check. Any assignment or unset conservatively removes the proof. * * @var array */ public array $nonNullNativeObjects = []; /** * Declared object constraints that are not used for native-call dispatch. * * @var array */ public array $declaredObjects = []; /** * @var array */ public array $stdArrays = []; /** * @var array */ public array $stdContainers = []; public array $localVars = []; public array $staticVars = []; public array $globalVars = []; /** * @var array */ public array $ceWrappers = []; /** Reusable php::CallableScope local, created only when this function performs scoped calls. */ public ?string $callableScopeVar = null; /** This generated body needs a temporary lexical scope on the nearest user-code frame. */ public bool $needsUserCodeCallableScope = false; public int $tmpVarIndex = 0; public array $arguments = []; /** @var array Bindings protected by #[Immutable]. */ public array $immutableVars = []; /** @var array Immutable bindings which may contain object identity. */ public array $immutableObjectVars = []; /** True while parsing a breakable loop or switch. */ public bool $inLoop = false; /** True while parsing a for/foreach/while/do-while body. */ public bool $inContinuableLoop = false; public bool $inClosure = false; public ?array $closureReturnTypeCheck = null; public string $closureReturnTypeStr = ''; /** True if any break N (N > 1) appears in this function. */ public bool $hasMultiLevelBreak = false; /** True if any continue N (N > 1) appears in this function. */ public bool $hasMultiLevelContinue = false; public array $beforeStmtLines = []; public array $afterStmtLines = []; public array $objectProps; /** Map of static property local slots. int/float keep stable zval* slots; other types use Var slots. */ public array $staticPropRefs = []; public int $scopeLevel = 0; /** * @var array */ public array $scopeLayouts = []; public function __construct() { $this->localVars = []; $this->staticVars = []; $this->arguments = []; $this->immutableVars = []; $this->immutableObjectVars = []; $this->objects = []; $this->nativeObjects = []; $this->nonNullNativeObjects = []; $this->declaredObjects = []; $this->stdArrays = []; $this->stdContainers = []; $this->objectProps = []; $this->ssaBuilder = null; $this->stableObjects = []; $this->hoistedProps = []; $this->unsafeObjectProps = []; $this->staticPropRefs = []; $this->ceWrappers = []; $this->callableScopeVar = null; $this->tmpVarIndex = 0; $this->scopeLayouts = []; $this->callableScopeVar = null; $this->scopeLevel = 0; $this->inLoop = false; $this->inContinuableLoop = false; $this->inClosure = false; $this->closureReturnTypeCheck = null; $this->closureReturnTypeStr = ''; } public function enterScope(): void { $this->scopeLayouts[$this->scopeLevel] = new ScopeContext(); $this->scopeLevel++; } public function leaveScope(): void { $this->scopeLevel--; unset($this->scopeLayouts[$this->scopeLevel]); } public function resetAnalysisTemporaries( array $localVars, int $tmpVarIndex, array $declaredObjects, array $nativeObjects = [], array $nonNullNativeObjects = [], ): void { $this->localVars = $localVars; $this->tmpVarIndex = $tmpVarIndex; $this->declaredObjects = $declaredObjects; $this->nativeObjects = $nativeObjects; $this->nonNullNativeObjects = $nonNullNativeObjects; $this->beforeStmtLines = []; $this->afterStmtLines = []; $this->objectProps = []; $this->hoistedProps = []; $this->staticPropRefs = []; $this->scopeLayouts = []; $this->scopeLevel = 0; $this->inLoop = false; $this->inContinuableLoop = false; } }