From f0df0d3eff888292a07b631eb4c07565a3f6282a Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Sat, 14 Nov 2026 13:33:21 -0800 Subject: [PATCH 1/4] Forget narrowed properties after a possibly impure method call when its values are not remembered With `rememberPossiblyImpureFunctionValues: false`, the return value of a method that only maybe has side effects is no longer remembered, but what was narrowed about the properties of the object it was called on still was. So a method that changes a property it was not declared impure for left its callers with a stale type, and a comparison of that property after the call was reported as always true or always false: $this->state = self::STATE_READY; if (!$this->parseNextTag()) { return $this->state === self::STATE_COMPLETE; // reported as always false } When the option is off, a method call and a static call within the declaring class now invalidate the object's properties, and a static call its static properties, unless the method is known to have no side effects, as they already did for a method that has them. With the option on, which is the default, nothing changes. The native MethodCallHandler and StaticCallHandler of the turbo extension get the same condition. The tests cover calls on `$this`, on another object, and through `?->`, `self::`, `static::`, and `parent::`, and that a pure method and a local variable are left alone. A counterpart fixture holds the default behavior, and a rule test shows the comparison above is no longer reported. Co-Authored-By: Claude Opus 5.5 (medium effort) Claude-Code-Session-Id: dfb24569-a61a-4404-8588-60a387d2cccb --- .../ExprHandler/MethodCallHandler.php | 8 +- .../ExprHandler/StaticCallHandler.php | 1 + ...memberPossiblyImpureFunctionValuesTest.php | 1 + ...ibly-impure-function-values-properties.php | 130 ++++++++++++++++++ ...ibly-impure-function-values-properties.php | 130 ++++++++++++++++++ ...otRememberPossiblyImpureValuesRuleTest.php | 52 +++++++ ...on-property-after-possibly-impure-call.php | 44 ++++++ turbo-ext/src/MethodCallHandler.cpp | 5 +- turbo-ext/src/StaticCallHandler.cpp | 3 +- 9 files changed, 371 insertions(+), 3 deletions(-) create mode 100644 tests/PHPStan/Analyser/data/do-not-remember-possibly-impure-function-values-properties.php create mode 100644 tests/PHPStan/Analyser/nsrt/remember-possibly-impure-function-values-properties.php create mode 100644 tests/PHPStan/Rules/Comparison/StrictComparisonOfDifferentTypesDoNotRememberPossiblyImpureValuesRuleTest.php create mode 100644 tests/PHPStan/Rules/Comparison/data/strict-comparison-property-after-possibly-impure-call.php diff --git a/src/Analyser/ExprHandler/MethodCallHandler.php b/src/Analyser/ExprHandler/MethodCallHandler.php index f13426cdd29..9e47d90c470 100644 --- a/src/Analyser/ExprHandler/MethodCallHandler.php +++ b/src/Analyser/ExprHandler/MethodCallHandler.php @@ -321,7 +321,13 @@ public function processExpr(NodeScopeResolver $nodeScopeResolver, Stmt $stmt, Ex $throwPoints[] = $methodThrowPoint; } - if ($methodReflection->getName() === '__construct' || $methodReflection->hasSideEffects()->yes()) { + if ( + $methodReflection->getName() === '__construct' + || $methodReflection->hasSideEffects()->yes() + // When possibly impure values are not remembered, a possibly impure method + // may also have changed the object's properties, so forget them too. + || (!$this->rememberPossiblyImpureFunctionValues && !$methodReflection->hasSideEffects()->no()) + ) { $nodeScopeResolver->callNodeCallback($nodeCallback, new InvalidateExprNode($normalizedExpr->var), $scope, $storage); $scope = $scope->invalidateExpression($normalizedExpr->var, true, $methodReflection->getDeclaringClass(), $methodReflection->isStatic()); } diff --git a/src/Analyser/ExprHandler/StaticCallHandler.php b/src/Analyser/ExprHandler/StaticCallHandler.php index e510200d21c..002784a04b4 100644 --- a/src/Analyser/ExprHandler/StaticCallHandler.php +++ b/src/Analyser/ExprHandler/StaticCallHandler.php @@ -382,6 +382,7 @@ public function processExpr(NodeScopeResolver $nodeScopeResolver, Stmt $stmt, Ex && $methodReflection->getName() === '__construct' ) || $methodReflection->hasSideEffects()->yes() + || (!$this->rememberPossiblyImpureFunctionValues && !$methodReflection->hasSideEffects()->no()) ) && $scope->isInClass() && $scope->getClassReflection()->is($methodReflection->getDeclaringClass()->getName()) diff --git a/tests/PHPStan/Analyser/DoNotRememberPossiblyImpureFunctionValuesTest.php b/tests/PHPStan/Analyser/DoNotRememberPossiblyImpureFunctionValuesTest.php index 75a9797ee38..c0ba1711574 100644 --- a/tests/PHPStan/Analyser/DoNotRememberPossiblyImpureFunctionValuesTest.php +++ b/tests/PHPStan/Analyser/DoNotRememberPossiblyImpureFunctionValuesTest.php @@ -11,6 +11,7 @@ class DoNotRememberPossiblyImpureFunctionValuesTest extends TypeInferenceTestCas public static function dataAsserts(): iterable { yield from self::gatherAssertTypes(__DIR__ . '/data/do-not-remember-possibly-impure-function-values.php'); + yield from self::gatherAssertTypes(__DIR__ . '/data/do-not-remember-possibly-impure-function-values-properties.php'); } /** diff --git a/tests/PHPStan/Analyser/data/do-not-remember-possibly-impure-function-values-properties.php b/tests/PHPStan/Analyser/data/do-not-remember-possibly-impure-function-values-properties.php new file mode 100644 index 00000000000..208a04deff6 --- /dev/null +++ b/tests/PHPStan/Analyser/data/do-not-remember-possibly-impure-function-values-properties.php @@ -0,0 +1,130 @@ +state = 'done'; + return true; + } + + /** @phpstan-pure */ + public function pure(): bool + { + return true; + } + + /** @phpstan-impure */ + public function impure(): bool + { + $this->state = 'done'; + return true; + } + + public static function advanceStatic(): bool + { + self::$staticState = 'done'; + return true; + } + + /** @phpstan-pure */ + public static function pureStatic(): bool + { + return true; + } + + public function doFoo(): void + { + $this->state = 'ready'; + $this->advance(); + assertType("'done'|'ready'", $this->state); + + $this->state = 'ready'; + if ($this->advance()) { + assertType("'done'|'ready'", $this->state); + } + + $this->state = 'ready'; + $this->pure(); + assertType("'ready'", $this->state); + + $this->state = 'ready'; + $this->impure(); + assertType("'done'|'ready'", $this->state); + } + + public function doLocalVariable(): void + { + $state = 'ready'; + $this->advance(); + assertType("'ready'", $state); + } + + public function doOtherObject(self $other): void + { + $this->state = 'ready'; + $other->state = 'ready'; + $other->advance(); + assertType("'done'|'ready'", $other->state); + assertType("'ready'", $this->state); + } + + public function doNullsafe(?self $other): void + { + if ($other === null) { + return; + } + + $other->state = 'ready'; + $other?->advance(); + assertType("'done'|'ready'", $other->state); + } + + public function doStatic(): void + { + self::$staticState = 'ready'; + self::advanceStatic(); + assertType("'done'|'ready'", self::$staticState); + + self::$staticState = 'ready'; + static::advanceStatic(); + assertType("'done'|'ready'", self::$staticState); + + self::$staticState = 'ready'; + self::pureStatic(); + assertType("'ready'", self::$staticState); + } + + public function doStaticKeepsInstanceProperties(): void + { + $this->state = 'ready'; + self::advanceStatic(); + assertType("'ready'", $this->state); + } + +} + +class ChildStateMachine extends StateMachine +{ + + public function advance(): bool + { + $this->state = 'ready'; + parent::advance(); + assertType("'done'|'ready'", $this->state); + + return true; + } + +} diff --git a/tests/PHPStan/Analyser/nsrt/remember-possibly-impure-function-values-properties.php b/tests/PHPStan/Analyser/nsrt/remember-possibly-impure-function-values-properties.php new file mode 100644 index 00000000000..e706a09f9ed --- /dev/null +++ b/tests/PHPStan/Analyser/nsrt/remember-possibly-impure-function-values-properties.php @@ -0,0 +1,130 @@ +state = 'done'; + return true; + } + + /** @phpstan-pure */ + public function pure(): bool + { + return true; + } + + /** @phpstan-impure */ + public function impure(): bool + { + $this->state = 'done'; + return true; + } + + public static function advanceStatic(): bool + { + self::$staticState = 'done'; + return true; + } + + /** @phpstan-pure */ + public static function pureStatic(): bool + { + return true; + } + + public function doFoo(): void + { + $this->state = 'ready'; + $this->advance(); + assertType("'ready'", $this->state); + + $this->state = 'ready'; + if ($this->advance()) { + assertType("'ready'", $this->state); + } + + $this->state = 'ready'; + $this->pure(); + assertType("'ready'", $this->state); + + $this->state = 'ready'; + $this->impure(); + assertType("'done'|'ready'", $this->state); + } + + public function doLocalVariable(): void + { + $state = 'ready'; + $this->advance(); + assertType("'ready'", $state); + } + + public function doOtherObject(self $other): void + { + $this->state = 'ready'; + $other->state = 'ready'; + $other->advance(); + assertType("'ready'", $other->state); + assertType("'ready'", $this->state); + } + + public function doNullsafe(?self $other): void + { + if ($other === null) { + return; + } + + $other->state = 'ready'; + $other?->advance(); + assertType("'ready'", $other->state); + } + + public function doStatic(): void + { + self::$staticState = 'ready'; + self::advanceStatic(); + assertType("'ready'", self::$staticState); + + self::$staticState = 'ready'; + static::advanceStatic(); + assertType("'ready'", self::$staticState); + + self::$staticState = 'ready'; + self::pureStatic(); + assertType("'ready'", self::$staticState); + } + + public function doStaticKeepsInstanceProperties(): void + { + $this->state = 'ready'; + self::advanceStatic(); + assertType("'ready'", $this->state); + } + +} + +class ChildStateMachine extends StateMachine +{ + + public function advance(): bool + { + $this->state = 'ready'; + parent::advance(); + assertType("'ready'", $this->state); + + return true; + } + +} diff --git a/tests/PHPStan/Rules/Comparison/StrictComparisonOfDifferentTypesDoNotRememberPossiblyImpureValuesRuleTest.php b/tests/PHPStan/Rules/Comparison/StrictComparisonOfDifferentTypesDoNotRememberPossiblyImpureValuesRuleTest.php new file mode 100644 index 00000000000..ae41ad6ec2f --- /dev/null +++ b/tests/PHPStan/Rules/Comparison/StrictComparisonOfDifferentTypesDoNotRememberPossiblyImpureValuesRuleTest.php @@ -0,0 +1,52 @@ + + */ +class StrictComparisonOfDifferentTypesDoNotRememberPossiblyImpureValuesRuleTest extends RuleTestCase +{ + + protected function getRule(): Rule + { + // @phpstan-ignore argument.type + return new CompositeRule([ + new StrictComparisonOfDifferentTypesRule( + self::getContainer()->getByType(RicherScopeGetTypeHelper::class), + self::getContainer()->getByType(ConstantConditionInTraitHelper::class), + true, + false, + true, + ), + new ConstantConditionInTraitRule(), + ]); + } + + public function testPropertyAfterPossiblyImpureCall(): void + { + $this->analyse([__DIR__ . '/data/strict-comparison-property-after-possibly-impure-call.php'], [ + [ + "Strict comparison using === between 'ready' and 'complete' will always evaluate to false.", + 41, + ], + ]); + } + + public static function getAdditionalConfigFiles(): array + { + return array_merge( + parent::getAdditionalConfigFiles(), + [ + __DIR__ . '/doNotRememberPossiblyImpureValues.neon', + ], + ); + } + +} diff --git a/tests/PHPStan/Rules/Comparison/data/strict-comparison-property-after-possibly-impure-call.php b/tests/PHPStan/Rules/Comparison/data/strict-comparison-property-after-possibly-impure-call.php new file mode 100644 index 00000000000..a49b3f403cd --- /dev/null +++ b/tests/PHPStan/Rules/Comparison/data/strict-comparison-property-after-possibly-impure-call.php @@ -0,0 +1,44 @@ +state = self::STATE_READY; + if (!$this->parseNextTag()) { + return $this->state === self::STATE_COMPLETE; + } + + return $this->state === self::STATE_MATCHED; + } + + private function parseNextTag(): bool + { + $this->state = rand(0, 1) === 1 ? self::STATE_MATCHED : self::STATE_COMPLETE; + return $this->state === self::STATE_MATCHED; + } + + /** @phpstan-pure */ + private function isReady(): bool + { + return true; + } + + public function afterPureCall(): bool + { + $this->state = self::STATE_READY; + $this->isReady(); + return $this->state === self::STATE_COMPLETE; + } + +} diff --git a/turbo-ext/src/MethodCallHandler.cpp b/turbo-ext/src/MethodCallHandler.cpp index 69c2bef129e..b1e55b41e53 100644 --- a/turbo-ext/src/MethodCallHandler.cpp +++ b/turbo-ext/src/MethodCallHandler.cpp @@ -446,7 +446,10 @@ class MethodCallHandler if (!invalidate) { zend_long hasSideEffects = reflectionTrinary(methodReflection.raw(), PT_MR_HAS_SIDE_EFFECTS); if (UNEXPECTED(hasSideEffects < 0)) return zv::Val(); - invalidate = hasSideEffects == PT_TRI_YES; + // When possibly impure values are not remembered, a possibly impure method + // may also have changed the object's properties, so forget them too. + invalidate = hasSideEffects == PT_TRI_YES + || (!zend_is_true(OBJ_PROP_NUM(self, slots::rememberPossiblyImpureFunctionValues)) && hasSideEffects != PT_TRI_NO); } if (invalidate) { zval *normalizedVar = exprVar(normalizedExpr.raw()); diff --git a/turbo-ext/src/StaticCallHandler.cpp b/turbo-ext/src/StaticCallHandler.cpp index a18c204676d..00b5d777644 100644 --- a/turbo-ext/src/StaticCallHandler.cpp +++ b/turbo-ext/src/StaticCallHandler.cpp @@ -679,7 +679,8 @@ class StaticCallHandler if (!invalidate) { zend_long hasSideEffects = reflectionTrinary(methodReflection.raw(), PT_MR_HAS_SIDE_EFFECTS); if (UNEXPECTED(hasSideEffects < 0)) return zv::Val(); - invalidate = hasSideEffects == PT_TRI_YES; + invalidate = hasSideEffects == PT_TRI_YES + || (!zend_is_true(OBJ_PROP_NUM(self, slots::rememberPossiblyImpureFunctionValues)) && hasSideEffects != PT_TRI_NO); } if (invalidate && UNEXPECTED(!scopeClassIsDeclaringClass(currentScope.raw(), methodReflection.raw(), invalidate))) return zv::Val(); if (invalidate) { From bba9a63e76ab22a7c8067c74e039a66978d09354 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Sat, 14 Nov 2026 19:55:33 -0800 Subject: [PATCH 2/4] Exempt built-in methods from forgetting narrowed properties, and test the issue's reproducer verbatim A possibly impure method declared in a built-in class, such as `ArrayObject::getIterator()` called on a subclass, invalidated the object's narrowed properties when `rememberPossiblyImpureFunctionValues` is false. The invalidation of volatile expressions after the same call already exempts built-in methods, since they do not change userland properties. The new condition now exempts them too, in the native `MethodCallHandler` and `StaticCallHandler` of the turbo extension as well. `hasSideEffects()` is no longer evaluated twice in the same condition; it is not memoized. In `StaticCallHandler`, the condition is nested once so the value can be held in a variable. The rule test's fixture is now `bug-15734.php`, the reproducer from the issue copied verbatim, and it expects no errors. The comparison after a pure call that the old fixture also covered is already covered by the type inference fixture. Both type inference fixtures gain cases for a method that asserts a property of `$this` with `@phpstan-assert-if-true`, for a static call made from a static method, and for calls to built-in methods. Co-Authored-By: Claude Opus 5.5 (medium effort) Claude-Session: https://claude.ai/code/session_01Tnky3JtcvQrtFGa2fwY9Ay Claude-Code-Session-Id: dfb24569-a61a-4404-8588-60a387d2cccb --- .../ExprHandler/MethodCallHandler.php | 10 +++- .../ExprHandler/StaticCallHandler.php | 36 ++++++++------ ...ibly-impure-function-values-properties.php | 47 +++++++++++++++++++ ...ibly-impure-function-values-properties.php | 47 +++++++++++++++++++ ...otRememberPossiblyImpureValuesRuleTest.php | 9 +--- .../Rules/Comparison/data/bug-15734.php | 27 +++++++++++ ...on-property-after-possibly-impure-call.php | 44 ----------------- turbo-ext/src/MethodCallHandler.cpp | 11 ++++- turbo-ext/src/StaticCallHandler.cpp | 13 ++++- 9 files changed, 173 insertions(+), 71 deletions(-) create mode 100644 tests/PHPStan/Rules/Comparison/data/bug-15734.php delete mode 100644 tests/PHPStan/Rules/Comparison/data/strict-comparison-property-after-possibly-impure-call.php diff --git a/src/Analyser/ExprHandler/MethodCallHandler.php b/src/Analyser/ExprHandler/MethodCallHandler.php index 9e47d90c470..3e1369dc800 100644 --- a/src/Analyser/ExprHandler/MethodCallHandler.php +++ b/src/Analyser/ExprHandler/MethodCallHandler.php @@ -321,12 +321,18 @@ public function processExpr(NodeScopeResolver $nodeScopeResolver, Stmt $stmt, Ex $throwPoints[] = $methodThrowPoint; } + $hasSideEffects = $methodReflection->hasSideEffects(); if ( $methodReflection->getName() === '__construct' - || $methodReflection->hasSideEffects()->yes() + || $hasSideEffects->yes() // When possibly impure values are not remembered, a possibly impure method // may also have changed the object's properties, so forget them too. - || (!$this->rememberPossiblyImpureFunctionValues && !$methodReflection->hasSideEffects()->no()) + // Built-in methods are exempt, as they are from invalidating volatile expressions below. + || ( + !$this->rememberPossiblyImpureFunctionValues + && !$hasSideEffects->no() + && !$methodReflection->getDeclaringClass()->isBuiltin() + ) ) { $nodeScopeResolver->callNodeCallback($nodeCallback, new InvalidateExprNode($normalizedExpr->var), $scope, $storage); $scope = $scope->invalidateExpression($normalizedExpr->var, true, $methodReflection->getDeclaringClass(), $methodReflection->isStatic()); diff --git a/src/Analyser/ExprHandler/StaticCallHandler.php b/src/Analyser/ExprHandler/StaticCallHandler.php index 002784a04b4..cd2a867a6ef 100644 --- a/src/Analyser/ExprHandler/StaticCallHandler.php +++ b/src/Analyser/ExprHandler/StaticCallHandler.php @@ -373,22 +373,30 @@ public function processExpr(NodeScopeResolver $nodeScopeResolver, Stmt $stmt, Ex } } - if ( - $expr->class instanceof Name - && $methodReflection !== null - && ( + if ($expr->class instanceof Name && $methodReflection !== null) { + $hasSideEffects = $methodReflection->hasSideEffects(); + if ( ( - !$methodReflection->isStatic() - && $methodReflection->getName() === '__construct' + ( + !$methodReflection->isStatic() + && $methodReflection->getName() === '__construct' + ) + || $hasSideEffects->yes() + // When possibly impure values are not remembered, a possibly impure method + // may also have changed the object's properties, so forget them too. + // Built-in methods are exempt, as they are from invalidating volatile expressions below. + || ( + !$this->rememberPossiblyImpureFunctionValues + && !$hasSideEffects->no() + && !$methodReflection->getDeclaringClass()->isBuiltin() + ) ) - || $methodReflection->hasSideEffects()->yes() - || (!$this->rememberPossiblyImpureFunctionValues && !$methodReflection->hasSideEffects()->no()) - ) - && $scope->isInClass() - && $scope->getClassReflection()->is($methodReflection->getDeclaringClass()->getName()) - ) { - // a static method never receives $this, so property fetches on it survive - $scope = $scope->invalidateExpression(new Variable('this'), true, $methodReflection->getDeclaringClass(), $methodReflection->isStatic()); + && $scope->isInClass() + && $scope->getClassReflection()->is($methodReflection->getDeclaringClass()->getName()) + ) { + // a static method never receives $this, so property fetches on it survive + $scope = $scope->invalidateExpression(new Variable('this'), true, $methodReflection->getDeclaringClass(), $methodReflection->isStatic()); + } } if ( diff --git a/tests/PHPStan/Analyser/data/do-not-remember-possibly-impure-function-values-properties.php b/tests/PHPStan/Analyser/data/do-not-remember-possibly-impure-function-values-properties.php index 208a04deff6..5c8686d8605 100644 --- a/tests/PHPStan/Analyser/data/do-not-remember-possibly-impure-function-values-properties.php +++ b/tests/PHPStan/Analyser/data/do-not-remember-possibly-impure-function-values-properties.php @@ -113,6 +113,53 @@ public function doStaticKeepsInstanceProperties(): void assertType("'ready'", $this->state); } + public static function doStaticFromStaticMethod(): void + { + self::$staticState = 'ready'; + self::advanceStatic(); + assertType("'done'|'ready'", self::$staticState); + + self::$staticState = 'ready'; + self::pureStatic(); + assertType("'ready'", self::$staticState); + } + +} + +class Holder +{ + + public ?\stdClass $foo = null; + + /** @phpstan-assert-if-true !null $this->foo */ + public function hasFoo(): bool + { + return $this->foo !== null; + } + + public function doAssertIfTrue(): void + { + if ($this->hasFoo()) { + assertType('stdClass', $this->foo); + } + } + +} + +/** @extends \ArrayObject */ +class Bag extends \ArrayObject +{ + + public ?int $n = null; + + public function doBuiltinMethod(): void + { + $this->n = 1; + $this->count(); + $this->getIterator(); + assertType('1', $this->n); + } + } class ChildStateMachine extends StateMachine diff --git a/tests/PHPStan/Analyser/nsrt/remember-possibly-impure-function-values-properties.php b/tests/PHPStan/Analyser/nsrt/remember-possibly-impure-function-values-properties.php index e706a09f9ed..bc9226c3bb6 100644 --- a/tests/PHPStan/Analyser/nsrt/remember-possibly-impure-function-values-properties.php +++ b/tests/PHPStan/Analyser/nsrt/remember-possibly-impure-function-values-properties.php @@ -113,6 +113,53 @@ public function doStaticKeepsInstanceProperties(): void assertType("'ready'", $this->state); } + public static function doStaticFromStaticMethod(): void + { + self::$staticState = 'ready'; + self::advanceStatic(); + assertType("'ready'", self::$staticState); + + self::$staticState = 'ready'; + self::pureStatic(); + assertType("'ready'", self::$staticState); + } + +} + +class Holder +{ + + public ?\stdClass $foo = null; + + /** @phpstan-assert-if-true !null $this->foo */ + public function hasFoo(): bool + { + return $this->foo !== null; + } + + public function doAssertIfTrue(): void + { + if ($this->hasFoo()) { + assertType('stdClass', $this->foo); + } + } + +} + +/** @extends \ArrayObject */ +class Bag extends \ArrayObject +{ + + public ?int $n = null; + + public function doBuiltinMethod(): void + { + $this->n = 1; + $this->count(); + $this->getIterator(); + assertType('1', $this->n); + } + } class ChildStateMachine extends StateMachine diff --git a/tests/PHPStan/Rules/Comparison/StrictComparisonOfDifferentTypesDoNotRememberPossiblyImpureValuesRuleTest.php b/tests/PHPStan/Rules/Comparison/StrictComparisonOfDifferentTypesDoNotRememberPossiblyImpureValuesRuleTest.php index ae41ad6ec2f..9967f47f82b 100644 --- a/tests/PHPStan/Rules/Comparison/StrictComparisonOfDifferentTypesDoNotRememberPossiblyImpureValuesRuleTest.php +++ b/tests/PHPStan/Rules/Comparison/StrictComparisonOfDifferentTypesDoNotRememberPossiblyImpureValuesRuleTest.php @@ -29,14 +29,9 @@ protected function getRule(): Rule ]); } - public function testPropertyAfterPossiblyImpureCall(): void + public function testBug15734(): void { - $this->analyse([__DIR__ . '/data/strict-comparison-property-after-possibly-impure-call.php'], [ - [ - "Strict comparison using === between 'ready' and 'complete' will always evaluate to false.", - 41, - ], - ]); + $this->analyse([__DIR__ . '/data/bug-15734.php'], []); } public static function getAdditionalConfigFiles(): array diff --git a/tests/PHPStan/Rules/Comparison/data/bug-15734.php b/tests/PHPStan/Rules/Comparison/data/bug-15734.php new file mode 100644 index 00000000000..3293c4b64ce --- /dev/null +++ b/tests/PHPStan/Rules/Comparison/data/bug-15734.php @@ -0,0 +1,27 @@ += 7.4 + +declare(strict_types = 1); + +namespace Bug15734; + +class Tokenizer +{ + /** @var 'ready'|'matched'|'complete' */ + private string $state = 'ready'; + + public function nextToken(): bool + { + $this->state = 'ready'; + if (!$this->parseNextTag()) { + return $this->state === 'complete'; + } + + return $this->state === 'matched'; + } + + private function parseNextTag(): bool + { + $this->state = rand(0, 1) === 1 ? 'matched' : 'complete'; + return $this->state === 'matched'; + } +} diff --git a/tests/PHPStan/Rules/Comparison/data/strict-comparison-property-after-possibly-impure-call.php b/tests/PHPStan/Rules/Comparison/data/strict-comparison-property-after-possibly-impure-call.php deleted file mode 100644 index a49b3f403cd..00000000000 --- a/tests/PHPStan/Rules/Comparison/data/strict-comparison-property-after-possibly-impure-call.php +++ /dev/null @@ -1,44 +0,0 @@ -state = self::STATE_READY; - if (!$this->parseNextTag()) { - return $this->state === self::STATE_COMPLETE; - } - - return $this->state === self::STATE_MATCHED; - } - - private function parseNextTag(): bool - { - $this->state = rand(0, 1) === 1 ? self::STATE_MATCHED : self::STATE_COMPLETE; - return $this->state === self::STATE_MATCHED; - } - - /** @phpstan-pure */ - private function isReady(): bool - { - return true; - } - - public function afterPureCall(): bool - { - $this->state = self::STATE_READY; - $this->isReady(); - return $this->state === self::STATE_COMPLETE; - } - -} diff --git a/turbo-ext/src/MethodCallHandler.cpp b/turbo-ext/src/MethodCallHandler.cpp index b1e55b41e53..118fdff32f2 100644 --- a/turbo-ext/src/MethodCallHandler.cpp +++ b/turbo-ext/src/MethodCallHandler.cpp @@ -446,10 +446,17 @@ class MethodCallHandler if (!invalidate) { zend_long hasSideEffects = reflectionTrinary(methodReflection.raw(), PT_MR_HAS_SIDE_EFFECTS); if (UNEXPECTED(hasSideEffects < 0)) return zv::Val(); + invalidate = hasSideEffects == PT_TRI_YES; // When possibly impure values are not remembered, a possibly impure method // may also have changed the object's properties, so forget them too. - invalidate = hasSideEffects == PT_TRI_YES - || (!zend_is_true(OBJ_PROP_NUM(self, slots::rememberPossiblyImpureFunctionValues)) && hasSideEffects != PT_TRI_NO); + // Built-in methods are exempt, as they are from invalidating volatile expressions below. + if (!invalidate && !zend_is_true(OBJ_PROP_NUM(self, slots::rememberPossiblyImpureFunctionValues)) && hasSideEffects != PT_TRI_NO) { + zv::Val declaringClass = pt_extended_method_reflection_call(methodReflection.raw(), PT_MR_GET_DECLARING_CLASS); + if (UNEXPECTED(declaringClass.isUndef())) return zv::Val(); + bool builtin; + if (UNEXPECTED(!pt_class_reflection_is_builtin(Z_OBJ_P(declaringClass.raw()), builtin))) return zv::Val(); + invalidate = !builtin; + } } if (invalidate) { zval *normalizedVar = exprVar(normalizedExpr.raw()); diff --git a/turbo-ext/src/StaticCallHandler.cpp b/turbo-ext/src/StaticCallHandler.cpp index 00b5d777644..cb31dc8e056 100644 --- a/turbo-ext/src/StaticCallHandler.cpp +++ b/turbo-ext/src/StaticCallHandler.cpp @@ -679,8 +679,17 @@ class StaticCallHandler if (!invalidate) { zend_long hasSideEffects = reflectionTrinary(methodReflection.raw(), PT_MR_HAS_SIDE_EFFECTS); if (UNEXPECTED(hasSideEffects < 0)) return zv::Val(); - invalidate = hasSideEffects == PT_TRI_YES - || (!zend_is_true(OBJ_PROP_NUM(self, slots::rememberPossiblyImpureFunctionValues)) && hasSideEffects != PT_TRI_NO); + invalidate = hasSideEffects == PT_TRI_YES; + // When possibly impure values are not remembered, a possibly impure method + // may also have changed the object's properties, so forget them too. + // Built-in methods are exempt, as they are from invalidating volatile expressions below. + if (!invalidate && !zend_is_true(OBJ_PROP_NUM(self, slots::rememberPossiblyImpureFunctionValues)) && hasSideEffects != PT_TRI_NO) { + zv::Val declaringClass = pt_extended_method_reflection_call(methodReflection.raw(), PT_MR_GET_DECLARING_CLASS); + if (UNEXPECTED(declaringClass.isUndef())) return zv::Val(); + bool builtin; + if (UNEXPECTED(!pt_class_reflection_is_builtin(Z_OBJ_P(declaringClass.raw()), builtin))) return zv::Val(); + invalidate = !builtin; + } } if (invalidate && UNEXPECTED(!scopeClassIsDeclaringClass(currentScope.raw(), methodReflection.raw(), invalidate))) return zv::Val(); if (invalidate) { From f6b3f8e89def4bc0be877062bc98df0b39008657 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Tue, 17 Nov 2026 08:39:16 -0800 Subject: [PATCH 3/4] Benchmark forgetting narrowed properties after possibly impure method calls Every benchmark was analysed with tests/bench/phpstan.neon alone, which leaves `rememberPossiblyImpureFunctionValues` on, so none measured the invalidation of `$this` after a possibly impure method call with the option off. AnalysisBench now also includes a .neon file of the same name as the benchmark when there is one. `possibly-impure-calls-forget-properties.php` narrows 60 parameters, 60 conditional expressions, and 4 properties of `$this`, then calls a method not known to be pure 1,000 times. Its .neon file turns the option off. `possibly-impure-calls-remember-properties.php` is the same code with the option on, so the two show the cost of the invalidation side by side. Both report no errors. Analysed natively through AnalysisBench on an Apple M-series machine, the forget case takes about 1.10 s and the remember case about 0.97 s. With the invalidation reverted, the forget case takes about as long as the remember case. The expected numbers are left for the Benchmarks workflow to measure. Co-Authored-By: Claude Opus 5.5 (medium effort) Claude-Session: https://claude.ai/code/session_01Tnky3JtcvQrtFGa2fwY9Ay Claude-Code-Session-Id: dfb24569-a61a-4404-8588-60a387d2cccb --- tests/bench/AnalysisBench.php | 15 +- ...ssibly-impure-calls-forget-properties.neon | 3 + ...ossibly-impure-calls-forget-properties.php | 2173 +++++++++++++++++ ...sibly-impure-calls-remember-properties.php | 2171 ++++++++++++++++ 4 files changed, 4360 insertions(+), 2 deletions(-) create mode 100644 tests/bench/data/possibly-impure-calls-forget-properties.neon create mode 100644 tests/bench/data/possibly-impure-calls-forget-properties.php create mode 100644 tests/bench/data/possibly-impure-calls-remember-properties.php diff --git a/tests/bench/AnalysisBench.php b/tests/bench/AnalysisBench.php index 668fb54f323..28523da1a84 100644 --- a/tests/bench/AnalysisBench.php +++ b/tests/bench/AnalysisBench.php @@ -25,12 +25,16 @@ use function file_get_contents; use function gc_disable; use function glob; +use function is_file; +use function strlen; +use function substr; use const E_ALL; use const E_DEPRECATED; use const STDERR; /** - * Analyses each file in data/ like bin/phpstan analyse does, with phpstan.neon. Only the analysis + * Analyses each file in data/ like bin/phpstan analyse does, with phpstan.neon, and with the .neon + * file of the same name next to it in data/ when there is one. Only the analysis * of the file is counted: before it, PHPStan boots and analyses Warmup.php, so the code every * analysis goes through is loaded and compiled. The native run Tally starts before the counted * one compiles the container and fills the caches in the case's scratch directory, which the @@ -83,9 +87,16 @@ public function boot(string $file): void error_reporting(E_ALL & ~E_DEPRECATED); gc_disable(); + // a benchmark that needs other parameters has them in a .neon file of the same name + $includes = [__DIR__ . '/phpstan.neon']; + $benchmarkConfigFile = substr($file, 0, -strlen('.php')) . '.neon'; + if (is_file($benchmarkConfigFile)) { + $includes[] = $benchmarkConfigFile; + } + $configFile = $this->scratch->path() . '/phpstan.neon'; FileSystem::write($configFile, Neon::encode([ - 'includes' => [__DIR__ . '/phpstan.neon'], + 'includes' => $includes, 'parameters' => ['tmpDir' => $this->scratch->path() . '/cache'], ], true)); diff --git a/tests/bench/data/possibly-impure-calls-forget-properties.neon b/tests/bench/data/possibly-impure-calls-forget-properties.neon new file mode 100644 index 00000000000..1bb02a37716 --- /dev/null +++ b/tests/bench/data/possibly-impure-calls-forget-properties.neon @@ -0,0 +1,3 @@ +# Included after ../phpstan.neon by AnalysisBench for possibly-impure-calls-forget-properties.php. +parameters: + rememberPossiblyImpureFunctionValues: false diff --git a/tests/bench/data/possibly-impure-calls-forget-properties.php b/tests/bench/data/possibly-impure-calls-forget-properties.php new file mode 100644 index 00000000000..d9870a9cd07 --- /dev/null +++ b/tests/bench/data/possibly-impure-calls-forget-properties.php @@ -0,0 +1,2173 @@ +label0 = 'label'; + $this->label1 = 'label'; + $this->label2 = 'label'; + $this->label3 = 'label'; + } + + private function nextId(): int + { + return ++$this->counter; + } + + public function build( + ?int $a0, + ?int $b0, + ?int $a1, + ?int $b1, + ?int $a2, + ?int $b2, + ?int $a3, + ?int $b3, + ?int $a4, + ?int $b4, + ?int $a5, + ?int $b5, + ?int $a6, + ?int $b6, + ?int $a7, + ?int $b7, + ?int $a8, + ?int $b8, + ?int $a9, + ?int $b9, + ?int $a10, + ?int $b10, + ?int $a11, + ?int $b11, + ?int $a12, + ?int $b12, + ?int $a13, + ?int $b13, + ?int $a14, + ?int $b14, + ?int $a15, + ?int $b15, + ?int $a16, + ?int $b16, + ?int $a17, + ?int $b17, + ?int $a18, + ?int $b18, + ?int $a19, + ?int $b19, + ?int $a20, + ?int $b20, + ?int $a21, + ?int $b21, + ?int $a22, + ?int $b22, + ?int $a23, + ?int $b23, + ?int $a24, + ?int $b24, + ?int $a25, + ?int $b25, + ?int $a26, + ?int $b26, + ?int $a27, + ?int $b27, + ?int $a28, + ?int $b28, + ?int $a29, + ?int $b29, + ?int $a30, + ?int $b30, + ?int $a31, + ?int $b31, + ?int $a32, + ?int $b32, + ?int $a33, + ?int $b33, + ?int $a34, + ?int $b34, + ?int $a35, + ?int $b35, + ?int $a36, + ?int $b36, + ?int $a37, + ?int $b37, + ?int $a38, + ?int $b38, + ?int $a39, + ?int $b39, + ?int $a40, + ?int $b40, + ?int $a41, + ?int $b41, + ?int $a42, + ?int $b42, + ?int $a43, + ?int $b43, + ?int $a44, + ?int $b44, + ?int $a45, + ?int $b45, + ?int $a46, + ?int $b46, + ?int $a47, + ?int $b47, + ?int $a48, + ?int $b48, + ?int $a49, + ?int $b49, + ?int $a50, + ?int $b50, + ?int $a51, + ?int $b51, + ?int $a52, + ?int $b52, + ?int $a53, + ?int $b53, + ?int $a54, + ?int $b54, + ?int $a55, + ?int $b55, + ?int $a56, + ?int $b56, + ?int $a57, + ?int $b57, + ?int $a58, + ?int $b58, + ?int $a59, + ?int $b59, + ): int + { + if ($this->label0 === null) { + return 0; + } + if ($this->label1 === null) { + return 0; + } + if ($this->label2 === null) { + return 0; + } + if ($this->label3 === null) { + return 0; + } + if ($a0 === null) { + return 0; + } + if ($a1 === null) { + return 0; + } + if ($a2 === null) { + return 0; + } + if ($a3 === null) { + return 0; + } + if ($a4 === null) { + return 0; + } + if ($a5 === null) { + return 0; + } + if ($a6 === null) { + return 0; + } + if ($a7 === null) { + return 0; + } + if ($a8 === null) { + return 0; + } + if ($a9 === null) { + return 0; + } + if ($a10 === null) { + return 0; + } + if ($a11 === null) { + return 0; + } + if ($a12 === null) { + return 0; + } + if ($a13 === null) { + return 0; + } + if ($a14 === null) { + return 0; + } + if ($a15 === null) { + return 0; + } + if ($a16 === null) { + return 0; + } + if ($a17 === null) { + return 0; + } + if ($a18 === null) { + return 0; + } + if ($a19 === null) { + return 0; + } + if ($a20 === null) { + return 0; + } + if ($a21 === null) { + return 0; + } + if ($a22 === null) { + return 0; + } + if ($a23 === null) { + return 0; + } + if ($a24 === null) { + return 0; + } + if ($a25 === null) { + return 0; + } + if ($a26 === null) { + return 0; + } + if ($a27 === null) { + return 0; + } + if ($a28 === null) { + return 0; + } + if ($a29 === null) { + return 0; + } + if ($a30 === null) { + return 0; + } + if ($a31 === null) { + return 0; + } + if ($a32 === null) { + return 0; + } + if ($a33 === null) { + return 0; + } + if ($a34 === null) { + return 0; + } + if ($a35 === null) { + return 0; + } + if ($a36 === null) { + return 0; + } + if ($a37 === null) { + return 0; + } + if ($a38 === null) { + return 0; + } + if ($a39 === null) { + return 0; + } + if ($a40 === null) { + return 0; + } + if ($a41 === null) { + return 0; + } + if ($a42 === null) { + return 0; + } + if ($a43 === null) { + return 0; + } + if ($a44 === null) { + return 0; + } + if ($a45 === null) { + return 0; + } + if ($a46 === null) { + return 0; + } + if ($a47 === null) { + return 0; + } + if ($a48 === null) { + return 0; + } + if ($a49 === null) { + return 0; + } + if ($a50 === null) { + return 0; + } + if ($a51 === null) { + return 0; + } + if ($a52 === null) { + return 0; + } + if ($a53 === null) { + return 0; + } + if ($a54 === null) { + return 0; + } + if ($a55 === null) { + return 0; + } + if ($a56 === null) { + return 0; + } + if ($a57 === null) { + return 0; + } + if ($a58 === null) { + return 0; + } + if ($a59 === null) { + return 0; + } + $hasB0 = $b0 !== null; + $hasB1 = $b1 !== null; + $hasB2 = $b2 !== null; + $hasB3 = $b3 !== null; + $hasB4 = $b4 !== null; + $hasB5 = $b5 !== null; + $hasB6 = $b6 !== null; + $hasB7 = $b7 !== null; + $hasB8 = $b8 !== null; + $hasB9 = $b9 !== null; + $hasB10 = $b10 !== null; + $hasB11 = $b11 !== null; + $hasB12 = $b12 !== null; + $hasB13 = $b13 !== null; + $hasB14 = $b14 !== null; + $hasB15 = $b15 !== null; + $hasB16 = $b16 !== null; + $hasB17 = $b17 !== null; + $hasB18 = $b18 !== null; + $hasB19 = $b19 !== null; + $hasB20 = $b20 !== null; + $hasB21 = $b21 !== null; + $hasB22 = $b22 !== null; + $hasB23 = $b23 !== null; + $hasB24 = $b24 !== null; + $hasB25 = $b25 !== null; + $hasB26 = $b26 !== null; + $hasB27 = $b27 !== null; + $hasB28 = $b28 !== null; + $hasB29 = $b29 !== null; + $hasB30 = $b30 !== null; + $hasB31 = $b31 !== null; + $hasB32 = $b32 !== null; + $hasB33 = $b33 !== null; + $hasB34 = $b34 !== null; + $hasB35 = $b35 !== null; + $hasB36 = $b36 !== null; + $hasB37 = $b37 !== null; + $hasB38 = $b38 !== null; + $hasB39 = $b39 !== null; + $hasB40 = $b40 !== null; + $hasB41 = $b41 !== null; + $hasB42 = $b42 !== null; + $hasB43 = $b43 !== null; + $hasB44 = $b44 !== null; + $hasB45 = $b45 !== null; + $hasB46 = $b46 !== null; + $hasB47 = $b47 !== null; + $hasB48 = $b48 !== null; + $hasB49 = $b49 !== null; + $hasB50 = $b50 !== null; + $hasB51 = $b51 !== null; + $hasB52 = $b52 !== null; + $hasB53 = $b53 !== null; + $hasB54 = $b54 !== null; + $hasB55 = $b55 !== null; + $hasB56 = $b56 !== null; + $hasB57 = $b57 !== null; + $hasB58 = $b58 !== null; + $hasB59 = $b59 !== null; + + $total = 0; + $total += $this->nextId() + $a0; + $total += $this->nextId() + $a1; + $total += $this->nextId() + $a2; + $total += $this->nextId() + $a3; + if ($hasB0) { + $total += $b0; + } + $total += $this->nextId() + $a4; + $total += $this->nextId() + $a5; + $total += $this->nextId() + $a6; + $total += $this->nextId() + $a7; + if ($hasB1) { + $total += $b1; + } + $total += $this->nextId() + $a8; + $total += $this->nextId() + $a9; + $total += $this->nextId() + $a10; + $total += $this->nextId() + $a11; + if ($hasB2) { + $total += $b2; + } + $total += $this->nextId() + $a12; + $total += $this->nextId() + $a13; + $total += $this->nextId() + $a14; + $total += $this->nextId() + $a15; + if ($hasB3) { + $total += $b3; + } + $total += $this->nextId() + $a16; + $total += $this->nextId() + $a17; + $total += $this->nextId() + $a18; + $total += $this->nextId() + $a19; + if ($hasB4) { + $total += $b4; + } + $total += $this->nextId() + $a20; + $total += $this->nextId() + $a21; + $total += $this->nextId() + $a22; + $total += $this->nextId() + $a23; + if ($hasB5) { + $total += $b5; + } + $total += $this->nextId() + $a24; + $total += $this->nextId() + $a25; + $total += $this->nextId() + $a26; + $total += $this->nextId() + $a27; + if ($hasB6) { + $total += $b6; + } + $total += $this->nextId() + $a28; + $total += $this->nextId() + $a29; + $total += $this->nextId() + $a30; + $total += $this->nextId() + $a31; + if ($hasB7) { + $total += $b7; + } + $total += $this->nextId() + $a32; + $total += $this->nextId() + $a33; + $total += $this->nextId() + $a34; + $total += $this->nextId() + $a35; + if ($hasB8) { + $total += $b8; + } + $total += $this->nextId() + $a36; + $total += $this->nextId() + $a37; + $total += $this->nextId() + $a38; + $total += $this->nextId() + $a39; + if ($hasB9) { + $total += $b9; + } + $total += $this->nextId() + $a40; + $total += $this->nextId() + $a41; + $total += $this->nextId() + $a42; + $total += $this->nextId() + $a43; + if ($hasB10) { + $total += $b10; + } + $total += $this->nextId() + $a44; + $total += $this->nextId() + $a45; + $total += $this->nextId() + $a46; + $total += $this->nextId() + $a47; + if ($hasB11) { + $total += $b11; + } + $total += $this->nextId() + $a48; + $total += $this->nextId() + $a49; + $total += $this->nextId() + $a50; + $total += $this->nextId() + $a51; + if ($hasB12) { + $total += $b12; + } + $total += $this->nextId() + $a52; + $total += $this->nextId() + $a53; + $total += $this->nextId() + $a54; + $total += $this->nextId() + $a55; + if ($hasB13) { + $total += $b13; + } + $total += $this->nextId() + $a56; + $total += $this->nextId() + $a57; + $total += $this->nextId() + $a58; + $total += $this->nextId() + $a59; + if ($hasB14) { + $total += $b14; + } + $total += $this->nextId() + $a0; + $total += $this->nextId() + $a1; + $total += $this->nextId() + $a2; + $total += $this->nextId() + $a3; + if ($hasB15) { + $total += $b15; + } + $total += $this->nextId() + $a4; + $total += $this->nextId() + $a5; + $total += $this->nextId() + $a6; + $total += $this->nextId() + $a7; + if ($hasB16) { + $total += $b16; + } + $total += $this->nextId() + $a8; + $total += $this->nextId() + $a9; + $total += $this->nextId() + $a10; + $total += $this->nextId() + $a11; + if ($hasB17) { + $total += $b17; + } + $total += $this->nextId() + $a12; + $total += $this->nextId() + $a13; + $total += $this->nextId() + $a14; + $total += $this->nextId() + $a15; + if ($hasB18) { + $total += $b18; + } + $total += $this->nextId() + $a16; + $total += $this->nextId() + $a17; + $total += $this->nextId() + $a18; + $total += $this->nextId() + $a19; + if ($hasB19) { + $total += $b19; + } + $total += $this->nextId() + $a20; + $total += $this->nextId() + $a21; + $total += $this->nextId() + $a22; + $total += $this->nextId() + $a23; + if ($hasB20) { + $total += $b20; + } + $total += $this->nextId() + $a24; + $total += $this->nextId() + $a25; + $total += $this->nextId() + $a26; + $total += $this->nextId() + $a27; + if ($hasB21) { + $total += $b21; + } + $total += $this->nextId() + $a28; + $total += $this->nextId() + $a29; + $total += $this->nextId() + $a30; + $total += $this->nextId() + $a31; + if ($hasB22) { + $total += $b22; + } + $total += $this->nextId() + $a32; + $total += $this->nextId() + $a33; + $total += $this->nextId() + $a34; + $total += $this->nextId() + $a35; + if ($hasB23) { + $total += $b23; + } + $total += $this->nextId() + $a36; + $total += $this->nextId() + $a37; + $total += $this->nextId() + $a38; + $total += $this->nextId() + $a39; + if ($hasB24) { + $total += $b24; + } + $total += $this->nextId() + $a40; + $total += $this->nextId() + $a41; + $total += $this->nextId() + $a42; + $total += $this->nextId() + $a43; + if ($hasB25) { + $total += $b25; + } + $total += $this->nextId() + $a44; + $total += $this->nextId() + $a45; + $total += $this->nextId() + $a46; + $total += $this->nextId() + $a47; + if ($hasB26) { + $total += $b26; + } + $total += $this->nextId() + $a48; + $total += $this->nextId() + $a49; + $total += $this->nextId() + $a50; + $total += $this->nextId() + $a51; + if ($hasB27) { + $total += $b27; + } + $total += $this->nextId() + $a52; + $total += $this->nextId() + $a53; + $total += $this->nextId() + $a54; + $total += $this->nextId() + $a55; + if ($hasB28) { + $total += $b28; + } + $total += $this->nextId() + $a56; + $total += $this->nextId() + $a57; + $total += $this->nextId() + $a58; + $total += $this->nextId() + $a59; + if ($hasB29) { + $total += $b29; + } + $total += $this->nextId() + $a0; + $total += $this->nextId() + $a1; + $total += $this->nextId() + $a2; + $total += $this->nextId() + $a3; + if ($hasB30) { + $total += $b30; + } + $total += $this->nextId() + $a4; + $total += $this->nextId() + $a5; + $total += $this->nextId() + $a6; + $total += $this->nextId() + $a7; + if ($hasB31) { + $total += $b31; + } + $total += $this->nextId() + $a8; + $total += $this->nextId() + $a9; + $total += $this->nextId() + $a10; + $total += $this->nextId() + $a11; + if ($hasB32) { + $total += $b32; + } + $total += $this->nextId() + $a12; + $total += $this->nextId() + $a13; + $total += $this->nextId() + $a14; + $total += $this->nextId() + $a15; + if ($hasB33) { + $total += $b33; + } + $total += $this->nextId() + $a16; + $total += $this->nextId() + $a17; + $total += $this->nextId() + $a18; + $total += $this->nextId() + $a19; + if ($hasB34) { + $total += $b34; + } + $total += $this->nextId() + $a20; + $total += $this->nextId() + $a21; + $total += $this->nextId() + $a22; + $total += $this->nextId() + $a23; + if ($hasB35) { + $total += $b35; + } + $total += $this->nextId() + $a24; + $total += $this->nextId() + $a25; + $total += $this->nextId() + $a26; + $total += $this->nextId() + $a27; + if ($hasB36) { + $total += $b36; + } + $total += $this->nextId() + $a28; + $total += $this->nextId() + $a29; + $total += $this->nextId() + $a30; + $total += $this->nextId() + $a31; + if ($hasB37) { + $total += $b37; + } + $total += $this->nextId() + $a32; + $total += $this->nextId() + $a33; + $total += $this->nextId() + $a34; + $total += $this->nextId() + $a35; + if ($hasB38) { + $total += $b38; + } + $total += $this->nextId() + $a36; + $total += $this->nextId() + $a37; + $total += $this->nextId() + $a38; + $total += $this->nextId() + $a39; + if ($hasB39) { + $total += $b39; + } + $total += $this->nextId() + $a40; + $total += $this->nextId() + $a41; + $total += $this->nextId() + $a42; + $total += $this->nextId() + $a43; + if ($hasB40) { + $total += $b40; + } + $total += $this->nextId() + $a44; + $total += $this->nextId() + $a45; + $total += $this->nextId() + $a46; + $total += $this->nextId() + $a47; + if ($hasB41) { + $total += $b41; + } + $total += $this->nextId() + $a48; + $total += $this->nextId() + $a49; + $total += $this->nextId() + $a50; + $total += $this->nextId() + $a51; + if ($hasB42) { + $total += $b42; + } + $total += $this->nextId() + $a52; + $total += $this->nextId() + $a53; + $total += $this->nextId() + $a54; + $total += $this->nextId() + $a55; + if ($hasB43) { + $total += $b43; + } + $total += $this->nextId() + $a56; + $total += $this->nextId() + $a57; + $total += $this->nextId() + $a58; + $total += $this->nextId() + $a59; + if ($hasB44) { + $total += $b44; + } + $total += $this->nextId() + $a0; + $total += $this->nextId() + $a1; + $total += $this->nextId() + $a2; + $total += $this->nextId() + $a3; + if ($hasB45) { + $total += $b45; + } + $total += $this->nextId() + $a4; + $total += $this->nextId() + $a5; + $total += $this->nextId() + $a6; + $total += $this->nextId() + $a7; + if ($hasB46) { + $total += $b46; + } + $total += $this->nextId() + $a8; + $total += $this->nextId() + $a9; + $total += $this->nextId() + $a10; + $total += $this->nextId() + $a11; + if ($hasB47) { + $total += $b47; + } + $total += $this->nextId() + $a12; + $total += $this->nextId() + $a13; + $total += $this->nextId() + $a14; + $total += $this->nextId() + $a15; + if ($hasB48) { + $total += $b48; + } + $total += $this->nextId() + $a16; + $total += $this->nextId() + $a17; + $total += $this->nextId() + $a18; + $total += $this->nextId() + $a19; + if ($hasB49) { + $total += $b49; + } + $total += $this->nextId() + $a20; + $total += $this->nextId() + $a21; + $total += $this->nextId() + $a22; + $total += $this->nextId() + $a23; + if ($hasB50) { + $total += $b50; + } + $total += $this->nextId() + $a24; + $total += $this->nextId() + $a25; + $total += $this->nextId() + $a26; + $total += $this->nextId() + $a27; + if ($hasB51) { + $total += $b51; + } + $total += $this->nextId() + $a28; + $total += $this->nextId() + $a29; + $total += $this->nextId() + $a30; + $total += $this->nextId() + $a31; + if ($hasB52) { + $total += $b52; + } + $total += $this->nextId() + $a32; + $total += $this->nextId() + $a33; + $total += $this->nextId() + $a34; + $total += $this->nextId() + $a35; + if ($hasB53) { + $total += $b53; + } + $total += $this->nextId() + $a36; + $total += $this->nextId() + $a37; + $total += $this->nextId() + $a38; + $total += $this->nextId() + $a39; + if ($hasB54) { + $total += $b54; + } + $total += $this->nextId() + $a40; + $total += $this->nextId() + $a41; + $total += $this->nextId() + $a42; + $total += $this->nextId() + $a43; + if ($hasB55) { + $total += $b55; + } + $total += $this->nextId() + $a44; + $total += $this->nextId() + $a45; + $total += $this->nextId() + $a46; + $total += $this->nextId() + $a47; + if ($hasB56) { + $total += $b56; + } + $total += $this->nextId() + $a48; + $total += $this->nextId() + $a49; + $total += $this->nextId() + $a50; + $total += $this->nextId() + $a51; + if ($hasB57) { + $total += $b57; + } + $total += $this->nextId() + $a52; + $total += $this->nextId() + $a53; + $total += $this->nextId() + $a54; + $total += $this->nextId() + $a55; + if ($hasB58) { + $total += $b58; + } + $total += $this->nextId() + $a56; + $total += $this->nextId() + $a57; + $total += $this->nextId() + $a58; + $total += $this->nextId() + $a59; + if ($hasB59) { + $total += $b59; + } + $total += $this->nextId() + $a0; + $total += $this->nextId() + $a1; + $total += $this->nextId() + $a2; + $total += $this->nextId() + $a3; + if ($hasB0) { + $total += $b0; + } + $total += $this->nextId() + $a4; + $total += $this->nextId() + $a5; + $total += $this->nextId() + $a6; + $total += $this->nextId() + $a7; + if ($hasB1) { + $total += $b1; + } + $total += $this->nextId() + $a8; + $total += $this->nextId() + $a9; + $total += $this->nextId() + $a10; + $total += $this->nextId() + $a11; + if ($hasB2) { + $total += $b2; + } + $total += $this->nextId() + $a12; + $total += $this->nextId() + $a13; + $total += $this->nextId() + $a14; + $total += $this->nextId() + $a15; + if ($hasB3) { + $total += $b3; + } + $total += $this->nextId() + $a16; + $total += $this->nextId() + $a17; + $total += $this->nextId() + $a18; + $total += $this->nextId() + $a19; + if ($hasB4) { + $total += $b4; + } + $total += $this->nextId() + $a20; + $total += $this->nextId() + $a21; + $total += $this->nextId() + $a22; + $total += $this->nextId() + $a23; + if ($hasB5) { + $total += $b5; + } + $total += $this->nextId() + $a24; + $total += $this->nextId() + $a25; + $total += $this->nextId() + $a26; + $total += $this->nextId() + $a27; + if ($hasB6) { + $total += $b6; + } + $total += $this->nextId() + $a28; + $total += $this->nextId() + $a29; + $total += $this->nextId() + $a30; + $total += $this->nextId() + $a31; + if ($hasB7) { + $total += $b7; + } + $total += $this->nextId() + $a32; + $total += $this->nextId() + $a33; + $total += $this->nextId() + $a34; + $total += $this->nextId() + $a35; + if ($hasB8) { + $total += $b8; + } + $total += $this->nextId() + $a36; + $total += $this->nextId() + $a37; + $total += $this->nextId() + $a38; + $total += $this->nextId() + $a39; + if ($hasB9) { + $total += $b9; + } + $total += $this->nextId() + $a40; + $total += $this->nextId() + $a41; + $total += $this->nextId() + $a42; + $total += $this->nextId() + $a43; + if ($hasB10) { + $total += $b10; + } + $total += $this->nextId() + $a44; + $total += $this->nextId() + $a45; + $total += $this->nextId() + $a46; + $total += $this->nextId() + $a47; + if ($hasB11) { + $total += $b11; + } + $total += $this->nextId() + $a48; + $total += $this->nextId() + $a49; + $total += $this->nextId() + $a50; + $total += $this->nextId() + $a51; + if ($hasB12) { + $total += $b12; + } + $total += $this->nextId() + $a52; + $total += $this->nextId() + $a53; + $total += $this->nextId() + $a54; + $total += $this->nextId() + $a55; + if ($hasB13) { + $total += $b13; + } + $total += $this->nextId() + $a56; + $total += $this->nextId() + $a57; + $total += $this->nextId() + $a58; + $total += $this->nextId() + $a59; + if ($hasB14) { + $total += $b14; + } + $total += $this->nextId() + $a0; + $total += $this->nextId() + $a1; + $total += $this->nextId() + $a2; + $total += $this->nextId() + $a3; + if ($hasB15) { + $total += $b15; + } + $total += $this->nextId() + $a4; + $total += $this->nextId() + $a5; + $total += $this->nextId() + $a6; + $total += $this->nextId() + $a7; + if ($hasB16) { + $total += $b16; + } + $total += $this->nextId() + $a8; + $total += $this->nextId() + $a9; + $total += $this->nextId() + $a10; + $total += $this->nextId() + $a11; + if ($hasB17) { + $total += $b17; + } + $total += $this->nextId() + $a12; + $total += $this->nextId() + $a13; + $total += $this->nextId() + $a14; + $total += $this->nextId() + $a15; + if ($hasB18) { + $total += $b18; + } + $total += $this->nextId() + $a16; + $total += $this->nextId() + $a17; + $total += $this->nextId() + $a18; + $total += $this->nextId() + $a19; + if ($hasB19) { + $total += $b19; + } + $total += $this->nextId() + $a20; + $total += $this->nextId() + $a21; + $total += $this->nextId() + $a22; + $total += $this->nextId() + $a23; + if ($hasB20) { + $total += $b20; + } + $total += $this->nextId() + $a24; + $total += $this->nextId() + $a25; + $total += $this->nextId() + $a26; + $total += $this->nextId() + $a27; + if ($hasB21) { + $total += $b21; + } + $total += $this->nextId() + $a28; + $total += $this->nextId() + $a29; + $total += $this->nextId() + $a30; + $total += $this->nextId() + $a31; + if ($hasB22) { + $total += $b22; + } + $total += $this->nextId() + $a32; + $total += $this->nextId() + $a33; + $total += $this->nextId() + $a34; + $total += $this->nextId() + $a35; + if ($hasB23) { + $total += $b23; + } + $total += $this->nextId() + $a36; + $total += $this->nextId() + $a37; + $total += $this->nextId() + $a38; + $total += $this->nextId() + $a39; + if ($hasB24) { + $total += $b24; + } + $total += $this->nextId() + $a40; + $total += $this->nextId() + $a41; + $total += $this->nextId() + $a42; + $total += $this->nextId() + $a43; + if ($hasB25) { + $total += $b25; + } + $total += $this->nextId() + $a44; + $total += $this->nextId() + $a45; + $total += $this->nextId() + $a46; + $total += $this->nextId() + $a47; + if ($hasB26) { + $total += $b26; + } + $total += $this->nextId() + $a48; + $total += $this->nextId() + $a49; + $total += $this->nextId() + $a50; + $total += $this->nextId() + $a51; + if ($hasB27) { + $total += $b27; + } + $total += $this->nextId() + $a52; + $total += $this->nextId() + $a53; + $total += $this->nextId() + $a54; + $total += $this->nextId() + $a55; + if ($hasB28) { + $total += $b28; + } + $total += $this->nextId() + $a56; + $total += $this->nextId() + $a57; + $total += $this->nextId() + $a58; + $total += $this->nextId() + $a59; + if ($hasB29) { + $total += $b29; + } + $total += $this->nextId() + $a0; + $total += $this->nextId() + $a1; + $total += $this->nextId() + $a2; + $total += $this->nextId() + $a3; + if ($hasB30) { + $total += $b30; + } + $total += $this->nextId() + $a4; + $total += $this->nextId() + $a5; + $total += $this->nextId() + $a6; + $total += $this->nextId() + $a7; + if ($hasB31) { + $total += $b31; + } + $total += $this->nextId() + $a8; + $total += $this->nextId() + $a9; + $total += $this->nextId() + $a10; + $total += $this->nextId() + $a11; + if ($hasB32) { + $total += $b32; + } + $total += $this->nextId() + $a12; + $total += $this->nextId() + $a13; + $total += $this->nextId() + $a14; + $total += $this->nextId() + $a15; + if ($hasB33) { + $total += $b33; + } + $total += $this->nextId() + $a16; + $total += $this->nextId() + $a17; + $total += $this->nextId() + $a18; + $total += $this->nextId() + $a19; + if ($hasB34) { + $total += $b34; + } + $total += $this->nextId() + $a20; + $total += $this->nextId() + $a21; + $total += $this->nextId() + $a22; + $total += $this->nextId() + $a23; + if ($hasB35) { + $total += $b35; + } + $total += $this->nextId() + $a24; + $total += $this->nextId() + $a25; + $total += $this->nextId() + $a26; + $total += $this->nextId() + $a27; + if ($hasB36) { + $total += $b36; + } + $total += $this->nextId() + $a28; + $total += $this->nextId() + $a29; + $total += $this->nextId() + $a30; + $total += $this->nextId() + $a31; + if ($hasB37) { + $total += $b37; + } + $total += $this->nextId() + $a32; + $total += $this->nextId() + $a33; + $total += $this->nextId() + $a34; + $total += $this->nextId() + $a35; + if ($hasB38) { + $total += $b38; + } + $total += $this->nextId() + $a36; + $total += $this->nextId() + $a37; + $total += $this->nextId() + $a38; + $total += $this->nextId() + $a39; + if ($hasB39) { + $total += $b39; + } + $total += $this->nextId() + $a40; + $total += $this->nextId() + $a41; + $total += $this->nextId() + $a42; + $total += $this->nextId() + $a43; + if ($hasB40) { + $total += $b40; + } + $total += $this->nextId() + $a44; + $total += $this->nextId() + $a45; + $total += $this->nextId() + $a46; + $total += $this->nextId() + $a47; + if ($hasB41) { + $total += $b41; + } + $total += $this->nextId() + $a48; + $total += $this->nextId() + $a49; + $total += $this->nextId() + $a50; + $total += $this->nextId() + $a51; + if ($hasB42) { + $total += $b42; + } + $total += $this->nextId() + $a52; + $total += $this->nextId() + $a53; + $total += $this->nextId() + $a54; + $total += $this->nextId() + $a55; + if ($hasB43) { + $total += $b43; + } + $total += $this->nextId() + $a56; + $total += $this->nextId() + $a57; + $total += $this->nextId() + $a58; + $total += $this->nextId() + $a59; + if ($hasB44) { + $total += $b44; + } + $total += $this->nextId() + $a0; + $total += $this->nextId() + $a1; + $total += $this->nextId() + $a2; + $total += $this->nextId() + $a3; + if ($hasB45) { + $total += $b45; + } + $total += $this->nextId() + $a4; + $total += $this->nextId() + $a5; + $total += $this->nextId() + $a6; + $total += $this->nextId() + $a7; + if ($hasB46) { + $total += $b46; + } + $total += $this->nextId() + $a8; + $total += $this->nextId() + $a9; + $total += $this->nextId() + $a10; + $total += $this->nextId() + $a11; + if ($hasB47) { + $total += $b47; + } + $total += $this->nextId() + $a12; + $total += $this->nextId() + $a13; + $total += $this->nextId() + $a14; + $total += $this->nextId() + $a15; + if ($hasB48) { + $total += $b48; + } + $total += $this->nextId() + $a16; + $total += $this->nextId() + $a17; + $total += $this->nextId() + $a18; + $total += $this->nextId() + $a19; + if ($hasB49) { + $total += $b49; + } + $total += $this->nextId() + $a20; + $total += $this->nextId() + $a21; + $total += $this->nextId() + $a22; + $total += $this->nextId() + $a23; + if ($hasB50) { + $total += $b50; + } + $total += $this->nextId() + $a24; + $total += $this->nextId() + $a25; + $total += $this->nextId() + $a26; + $total += $this->nextId() + $a27; + if ($hasB51) { + $total += $b51; + } + $total += $this->nextId() + $a28; + $total += $this->nextId() + $a29; + $total += $this->nextId() + $a30; + $total += $this->nextId() + $a31; + if ($hasB52) { + $total += $b52; + } + $total += $this->nextId() + $a32; + $total += $this->nextId() + $a33; + $total += $this->nextId() + $a34; + $total += $this->nextId() + $a35; + if ($hasB53) { + $total += $b53; + } + $total += $this->nextId() + $a36; + $total += $this->nextId() + $a37; + $total += $this->nextId() + $a38; + $total += $this->nextId() + $a39; + if ($hasB54) { + $total += $b54; + } + $total += $this->nextId() + $a40; + $total += $this->nextId() + $a41; + $total += $this->nextId() + $a42; + $total += $this->nextId() + $a43; + if ($hasB55) { + $total += $b55; + } + $total += $this->nextId() + $a44; + $total += $this->nextId() + $a45; + $total += $this->nextId() + $a46; + $total += $this->nextId() + $a47; + if ($hasB56) { + $total += $b56; + } + $total += $this->nextId() + $a48; + $total += $this->nextId() + $a49; + $total += $this->nextId() + $a50; + $total += $this->nextId() + $a51; + if ($hasB57) { + $total += $b57; + } + $total += $this->nextId() + $a52; + $total += $this->nextId() + $a53; + $total += $this->nextId() + $a54; + $total += $this->nextId() + $a55; + if ($hasB58) { + $total += $b58; + } + $total += $this->nextId() + $a56; + $total += $this->nextId() + $a57; + $total += $this->nextId() + $a58; + $total += $this->nextId() + $a59; + if ($hasB59) { + $total += $b59; + } + $total += $this->nextId() + $a0; + $total += $this->nextId() + $a1; + $total += $this->nextId() + $a2; + $total += $this->nextId() + $a3; + if ($hasB0) { + $total += $b0; + } + $total += $this->nextId() + $a4; + $total += $this->nextId() + $a5; + $total += $this->nextId() + $a6; + $total += $this->nextId() + $a7; + if ($hasB1) { + $total += $b1; + } + $total += $this->nextId() + $a8; + $total += $this->nextId() + $a9; + $total += $this->nextId() + $a10; + $total += $this->nextId() + $a11; + if ($hasB2) { + $total += $b2; + } + $total += $this->nextId() + $a12; + $total += $this->nextId() + $a13; + $total += $this->nextId() + $a14; + $total += $this->nextId() + $a15; + if ($hasB3) { + $total += $b3; + } + $total += $this->nextId() + $a16; + $total += $this->nextId() + $a17; + $total += $this->nextId() + $a18; + $total += $this->nextId() + $a19; + if ($hasB4) { + $total += $b4; + } + $total += $this->nextId() + $a20; + $total += $this->nextId() + $a21; + $total += $this->nextId() + $a22; + $total += $this->nextId() + $a23; + if ($hasB5) { + $total += $b5; + } + $total += $this->nextId() + $a24; + $total += $this->nextId() + $a25; + $total += $this->nextId() + $a26; + $total += $this->nextId() + $a27; + if ($hasB6) { + $total += $b6; + } + $total += $this->nextId() + $a28; + $total += $this->nextId() + $a29; + $total += $this->nextId() + $a30; + $total += $this->nextId() + $a31; + if ($hasB7) { + $total += $b7; + } + $total += $this->nextId() + $a32; + $total += $this->nextId() + $a33; + $total += $this->nextId() + $a34; + $total += $this->nextId() + $a35; + if ($hasB8) { + $total += $b8; + } + $total += $this->nextId() + $a36; + $total += $this->nextId() + $a37; + $total += $this->nextId() + $a38; + $total += $this->nextId() + $a39; + if ($hasB9) { + $total += $b9; + } + $total += $this->nextId() + $a40; + $total += $this->nextId() + $a41; + $total += $this->nextId() + $a42; + $total += $this->nextId() + $a43; + if ($hasB10) { + $total += $b10; + } + $total += $this->nextId() + $a44; + $total += $this->nextId() + $a45; + $total += $this->nextId() + $a46; + $total += $this->nextId() + $a47; + if ($hasB11) { + $total += $b11; + } + $total += $this->nextId() + $a48; + $total += $this->nextId() + $a49; + $total += $this->nextId() + $a50; + $total += $this->nextId() + $a51; + if ($hasB12) { + $total += $b12; + } + $total += $this->nextId() + $a52; + $total += $this->nextId() + $a53; + $total += $this->nextId() + $a54; + $total += $this->nextId() + $a55; + if ($hasB13) { + $total += $b13; + } + $total += $this->nextId() + $a56; + $total += $this->nextId() + $a57; + $total += $this->nextId() + $a58; + $total += $this->nextId() + $a59; + if ($hasB14) { + $total += $b14; + } + $total += $this->nextId() + $a0; + $total += $this->nextId() + $a1; + $total += $this->nextId() + $a2; + $total += $this->nextId() + $a3; + if ($hasB15) { + $total += $b15; + } + $total += $this->nextId() + $a4; + $total += $this->nextId() + $a5; + $total += $this->nextId() + $a6; + $total += $this->nextId() + $a7; + if ($hasB16) { + $total += $b16; + } + $total += $this->nextId() + $a8; + $total += $this->nextId() + $a9; + $total += $this->nextId() + $a10; + $total += $this->nextId() + $a11; + if ($hasB17) { + $total += $b17; + } + $total += $this->nextId() + $a12; + $total += $this->nextId() + $a13; + $total += $this->nextId() + $a14; + $total += $this->nextId() + $a15; + if ($hasB18) { + $total += $b18; + } + $total += $this->nextId() + $a16; + $total += $this->nextId() + $a17; + $total += $this->nextId() + $a18; + $total += $this->nextId() + $a19; + if ($hasB19) { + $total += $b19; + } + $total += $this->nextId() + $a20; + $total += $this->nextId() + $a21; + $total += $this->nextId() + $a22; + $total += $this->nextId() + $a23; + if ($hasB20) { + $total += $b20; + } + $total += $this->nextId() + $a24; + $total += $this->nextId() + $a25; + $total += $this->nextId() + $a26; + $total += $this->nextId() + $a27; + if ($hasB21) { + $total += $b21; + } + $total += $this->nextId() + $a28; + $total += $this->nextId() + $a29; + $total += $this->nextId() + $a30; + $total += $this->nextId() + $a31; + if ($hasB22) { + $total += $b22; + } + $total += $this->nextId() + $a32; + $total += $this->nextId() + $a33; + $total += $this->nextId() + $a34; + $total += $this->nextId() + $a35; + if ($hasB23) { + $total += $b23; + } + $total += $this->nextId() + $a36; + $total += $this->nextId() + $a37; + $total += $this->nextId() + $a38; + $total += $this->nextId() + $a39; + if ($hasB24) { + $total += $b24; + } + $total += $this->nextId() + $a40; + $total += $this->nextId() + $a41; + $total += $this->nextId() + $a42; + $total += $this->nextId() + $a43; + if ($hasB25) { + $total += $b25; + } + $total += $this->nextId() + $a44; + $total += $this->nextId() + $a45; + $total += $this->nextId() + $a46; + $total += $this->nextId() + $a47; + if ($hasB26) { + $total += $b26; + } + $total += $this->nextId() + $a48; + $total += $this->nextId() + $a49; + $total += $this->nextId() + $a50; + $total += $this->nextId() + $a51; + if ($hasB27) { + $total += $b27; + } + $total += $this->nextId() + $a52; + $total += $this->nextId() + $a53; + $total += $this->nextId() + $a54; + $total += $this->nextId() + $a55; + if ($hasB28) { + $total += $b28; + } + $total += $this->nextId() + $a56; + $total += $this->nextId() + $a57; + $total += $this->nextId() + $a58; + $total += $this->nextId() + $a59; + if ($hasB29) { + $total += $b29; + } + $total += $this->nextId() + $a0; + $total += $this->nextId() + $a1; + $total += $this->nextId() + $a2; + $total += $this->nextId() + $a3; + if ($hasB30) { + $total += $b30; + } + $total += $this->nextId() + $a4; + $total += $this->nextId() + $a5; + $total += $this->nextId() + $a6; + $total += $this->nextId() + $a7; + if ($hasB31) { + $total += $b31; + } + $total += $this->nextId() + $a8; + $total += $this->nextId() + $a9; + $total += $this->nextId() + $a10; + $total += $this->nextId() + $a11; + if ($hasB32) { + $total += $b32; + } + $total += $this->nextId() + $a12; + $total += $this->nextId() + $a13; + $total += $this->nextId() + $a14; + $total += $this->nextId() + $a15; + if ($hasB33) { + $total += $b33; + } + $total += $this->nextId() + $a16; + $total += $this->nextId() + $a17; + $total += $this->nextId() + $a18; + $total += $this->nextId() + $a19; + if ($hasB34) { + $total += $b34; + } + $total += $this->nextId() + $a20; + $total += $this->nextId() + $a21; + $total += $this->nextId() + $a22; + $total += $this->nextId() + $a23; + if ($hasB35) { + $total += $b35; + } + $total += $this->nextId() + $a24; + $total += $this->nextId() + $a25; + $total += $this->nextId() + $a26; + $total += $this->nextId() + $a27; + if ($hasB36) { + $total += $b36; + } + $total += $this->nextId() + $a28; + $total += $this->nextId() + $a29; + $total += $this->nextId() + $a30; + $total += $this->nextId() + $a31; + if ($hasB37) { + $total += $b37; + } + $total += $this->nextId() + $a32; + $total += $this->nextId() + $a33; + $total += $this->nextId() + $a34; + $total += $this->nextId() + $a35; + if ($hasB38) { + $total += $b38; + } + $total += $this->nextId() + $a36; + $total += $this->nextId() + $a37; + $total += $this->nextId() + $a38; + $total += $this->nextId() + $a39; + if ($hasB39) { + $total += $b39; + } + $total += $this->nextId() + $a40; + $total += $this->nextId() + $a41; + $total += $this->nextId() + $a42; + $total += $this->nextId() + $a43; + if ($hasB40) { + $total += $b40; + } + $total += $this->nextId() + $a44; + $total += $this->nextId() + $a45; + $total += $this->nextId() + $a46; + $total += $this->nextId() + $a47; + if ($hasB41) { + $total += $b41; + } + $total += $this->nextId() + $a48; + $total += $this->nextId() + $a49; + $total += $this->nextId() + $a50; + $total += $this->nextId() + $a51; + if ($hasB42) { + $total += $b42; + } + $total += $this->nextId() + $a52; + $total += $this->nextId() + $a53; + $total += $this->nextId() + $a54; + $total += $this->nextId() + $a55; + if ($hasB43) { + $total += $b43; + } + $total += $this->nextId() + $a56; + $total += $this->nextId() + $a57; + $total += $this->nextId() + $a58; + $total += $this->nextId() + $a59; + if ($hasB44) { + $total += $b44; + } + $total += $this->nextId() + $a0; + $total += $this->nextId() + $a1; + $total += $this->nextId() + $a2; + $total += $this->nextId() + $a3; + if ($hasB45) { + $total += $b45; + } + $total += $this->nextId() + $a4; + $total += $this->nextId() + $a5; + $total += $this->nextId() + $a6; + $total += $this->nextId() + $a7; + if ($hasB46) { + $total += $b46; + } + $total += $this->nextId() + $a8; + $total += $this->nextId() + $a9; + $total += $this->nextId() + $a10; + $total += $this->nextId() + $a11; + if ($hasB47) { + $total += $b47; + } + $total += $this->nextId() + $a12; + $total += $this->nextId() + $a13; + $total += $this->nextId() + $a14; + $total += $this->nextId() + $a15; + if ($hasB48) { + $total += $b48; + } + $total += $this->nextId() + $a16; + $total += $this->nextId() + $a17; + $total += $this->nextId() + $a18; + $total += $this->nextId() + $a19; + if ($hasB49) { + $total += $b49; + } + $total += $this->nextId() + $a20; + $total += $this->nextId() + $a21; + $total += $this->nextId() + $a22; + $total += $this->nextId() + $a23; + if ($hasB50) { + $total += $b50; + } + $total += $this->nextId() + $a24; + $total += $this->nextId() + $a25; + $total += $this->nextId() + $a26; + $total += $this->nextId() + $a27; + if ($hasB51) { + $total += $b51; + } + $total += $this->nextId() + $a28; + $total += $this->nextId() + $a29; + $total += $this->nextId() + $a30; + $total += $this->nextId() + $a31; + if ($hasB52) { + $total += $b52; + } + $total += $this->nextId() + $a32; + $total += $this->nextId() + $a33; + $total += $this->nextId() + $a34; + $total += $this->nextId() + $a35; + if ($hasB53) { + $total += $b53; + } + $total += $this->nextId() + $a36; + $total += $this->nextId() + $a37; + $total += $this->nextId() + $a38; + $total += $this->nextId() + $a39; + if ($hasB54) { + $total += $b54; + } + $total += $this->nextId() + $a40; + $total += $this->nextId() + $a41; + $total += $this->nextId() + $a42; + $total += $this->nextId() + $a43; + if ($hasB55) { + $total += $b55; + } + $total += $this->nextId() + $a44; + $total += $this->nextId() + $a45; + $total += $this->nextId() + $a46; + $total += $this->nextId() + $a47; + if ($hasB56) { + $total += $b56; + } + $total += $this->nextId() + $a48; + $total += $this->nextId() + $a49; + $total += $this->nextId() + $a50; + $total += $this->nextId() + $a51; + if ($hasB57) { + $total += $b57; + } + $total += $this->nextId() + $a52; + $total += $this->nextId() + $a53; + $total += $this->nextId() + $a54; + $total += $this->nextId() + $a55; + if ($hasB58) { + $total += $b58; + } + $total += $this->nextId() + $a56; + $total += $this->nextId() + $a57; + $total += $this->nextId() + $a58; + $total += $this->nextId() + $a59; + if ($hasB59) { + $total += $b59; + } + $total += $this->nextId() + $a0; + $total += $this->nextId() + $a1; + $total += $this->nextId() + $a2; + $total += $this->nextId() + $a3; + if ($hasB0) { + $total += $b0; + } + $total += $this->nextId() + $a4; + $total += $this->nextId() + $a5; + $total += $this->nextId() + $a6; + $total += $this->nextId() + $a7; + if ($hasB1) { + $total += $b1; + } + $total += $this->nextId() + $a8; + $total += $this->nextId() + $a9; + $total += $this->nextId() + $a10; + $total += $this->nextId() + $a11; + if ($hasB2) { + $total += $b2; + } + $total += $this->nextId() + $a12; + $total += $this->nextId() + $a13; + $total += $this->nextId() + $a14; + $total += $this->nextId() + $a15; + if ($hasB3) { + $total += $b3; + } + $total += $this->nextId() + $a16; + $total += $this->nextId() + $a17; + $total += $this->nextId() + $a18; + $total += $this->nextId() + $a19; + if ($hasB4) { + $total += $b4; + } + $total += $this->nextId() + $a20; + $total += $this->nextId() + $a21; + $total += $this->nextId() + $a22; + $total += $this->nextId() + $a23; + if ($hasB5) { + $total += $b5; + } + $total += $this->nextId() + $a24; + $total += $this->nextId() + $a25; + $total += $this->nextId() + $a26; + $total += $this->nextId() + $a27; + if ($hasB6) { + $total += $b6; + } + $total += $this->nextId() + $a28; + $total += $this->nextId() + $a29; + $total += $this->nextId() + $a30; + $total += $this->nextId() + $a31; + if ($hasB7) { + $total += $b7; + } + $total += $this->nextId() + $a32; + $total += $this->nextId() + $a33; + $total += $this->nextId() + $a34; + $total += $this->nextId() + $a35; + if ($hasB8) { + $total += $b8; + } + $total += $this->nextId() + $a36; + $total += $this->nextId() + $a37; + $total += $this->nextId() + $a38; + $total += $this->nextId() + $a39; + if ($hasB9) { + $total += $b9; + } + $total += $this->nextId() + $a40; + $total += $this->nextId() + $a41; + $total += $this->nextId() + $a42; + $total += $this->nextId() + $a43; + if ($hasB10) { + $total += $b10; + } + $total += $this->nextId() + $a44; + $total += $this->nextId() + $a45; + $total += $this->nextId() + $a46; + $total += $this->nextId() + $a47; + if ($hasB11) { + $total += $b11; + } + $total += $this->nextId() + $a48; + $total += $this->nextId() + $a49; + $total += $this->nextId() + $a50; + $total += $this->nextId() + $a51; + if ($hasB12) { + $total += $b12; + } + $total += $this->nextId() + $a52; + $total += $this->nextId() + $a53; + $total += $this->nextId() + $a54; + $total += $this->nextId() + $a55; + if ($hasB13) { + $total += $b13; + } + $total += $this->nextId() + $a56; + $total += $this->nextId() + $a57; + $total += $this->nextId() + $a58; + $total += $this->nextId() + $a59; + if ($hasB14) { + $total += $b14; + } + $total += $this->nextId() + $a0; + $total += $this->nextId() + $a1; + $total += $this->nextId() + $a2; + $total += $this->nextId() + $a3; + if ($hasB15) { + $total += $b15; + } + $total += $this->nextId() + $a4; + $total += $this->nextId() + $a5; + $total += $this->nextId() + $a6; + $total += $this->nextId() + $a7; + if ($hasB16) { + $total += $b16; + } + $total += $this->nextId() + $a8; + $total += $this->nextId() + $a9; + $total += $this->nextId() + $a10; + $total += $this->nextId() + $a11; + if ($hasB17) { + $total += $b17; + } + $total += $this->nextId() + $a12; + $total += $this->nextId() + $a13; + $total += $this->nextId() + $a14; + $total += $this->nextId() + $a15; + if ($hasB18) { + $total += $b18; + } + $total += $this->nextId() + $a16; + $total += $this->nextId() + $a17; + $total += $this->nextId() + $a18; + $total += $this->nextId() + $a19; + if ($hasB19) { + $total += $b19; + } + $total += $this->nextId() + $a20; + $total += $this->nextId() + $a21; + $total += $this->nextId() + $a22; + $total += $this->nextId() + $a23; + if ($hasB20) { + $total += $b20; + } + $total += $this->nextId() + $a24; + $total += $this->nextId() + $a25; + $total += $this->nextId() + $a26; + $total += $this->nextId() + $a27; + if ($hasB21) { + $total += $b21; + } + $total += $this->nextId() + $a28; + $total += $this->nextId() + $a29; + $total += $this->nextId() + $a30; + $total += $this->nextId() + $a31; + if ($hasB22) { + $total += $b22; + } + $total += $this->nextId() + $a32; + $total += $this->nextId() + $a33; + $total += $this->nextId() + $a34; + $total += $this->nextId() + $a35; + if ($hasB23) { + $total += $b23; + } + $total += $this->nextId() + $a36; + $total += $this->nextId() + $a37; + $total += $this->nextId() + $a38; + $total += $this->nextId() + $a39; + if ($hasB24) { + $total += $b24; + } + $total += $this->nextId() + $a40; + $total += $this->nextId() + $a41; + $total += $this->nextId() + $a42; + $total += $this->nextId() + $a43; + if ($hasB25) { + $total += $b25; + } + $total += $this->nextId() + $a44; + $total += $this->nextId() + $a45; + $total += $this->nextId() + $a46; + $total += $this->nextId() + $a47; + if ($hasB26) { + $total += $b26; + } + $total += $this->nextId() + $a48; + $total += $this->nextId() + $a49; + $total += $this->nextId() + $a50; + $total += $this->nextId() + $a51; + if ($hasB27) { + $total += $b27; + } + $total += $this->nextId() + $a52; + $total += $this->nextId() + $a53; + $total += $this->nextId() + $a54; + $total += $this->nextId() + $a55; + if ($hasB28) { + $total += $b28; + } + $total += $this->nextId() + $a56; + $total += $this->nextId() + $a57; + $total += $this->nextId() + $a58; + $total += $this->nextId() + $a59; + if ($hasB29) { + $total += $b29; + } + $total += $this->nextId() + $a0; + $total += $this->nextId() + $a1; + $total += $this->nextId() + $a2; + $total += $this->nextId() + $a3; + if ($hasB30) { + $total += $b30; + } + $total += $this->nextId() + $a4; + $total += $this->nextId() + $a5; + $total += $this->nextId() + $a6; + $total += $this->nextId() + $a7; + if ($hasB31) { + $total += $b31; + } + $total += $this->nextId() + $a8; + $total += $this->nextId() + $a9; + $total += $this->nextId() + $a10; + $total += $this->nextId() + $a11; + if ($hasB32) { + $total += $b32; + } + $total += $this->nextId() + $a12; + $total += $this->nextId() + $a13; + $total += $this->nextId() + $a14; + $total += $this->nextId() + $a15; + if ($hasB33) { + $total += $b33; + } + $total += $this->nextId() + $a16; + $total += $this->nextId() + $a17; + $total += $this->nextId() + $a18; + $total += $this->nextId() + $a19; + if ($hasB34) { + $total += $b34; + } + $total += $this->nextId() + $a20; + $total += $this->nextId() + $a21; + $total += $this->nextId() + $a22; + $total += $this->nextId() + $a23; + if ($hasB35) { + $total += $b35; + } + $total += $this->nextId() + $a24; + $total += $this->nextId() + $a25; + $total += $this->nextId() + $a26; + $total += $this->nextId() + $a27; + if ($hasB36) { + $total += $b36; + } + $total += $this->nextId() + $a28; + $total += $this->nextId() + $a29; + $total += $this->nextId() + $a30; + $total += $this->nextId() + $a31; + if ($hasB37) { + $total += $b37; + } + $total += $this->nextId() + $a32; + $total += $this->nextId() + $a33; + $total += $this->nextId() + $a34; + $total += $this->nextId() + $a35; + if ($hasB38) { + $total += $b38; + } + $total += $this->nextId() + $a36; + $total += $this->nextId() + $a37; + $total += $this->nextId() + $a38; + $total += $this->nextId() + $a39; + if ($hasB39) { + $total += $b39; + } + $total += $this->nextId() + $a40; + $total += $this->nextId() + $a41; + $total += $this->nextId() + $a42; + $total += $this->nextId() + $a43; + if ($hasB40) { + $total += $b40; + } + $total += $this->nextId() + $a44; + $total += $this->nextId() + $a45; + $total += $this->nextId() + $a46; + $total += $this->nextId() + $a47; + if ($hasB41) { + $total += $b41; + } + $total += $this->nextId() + $a48; + $total += $this->nextId() + $a49; + $total += $this->nextId() + $a50; + $total += $this->nextId() + $a51; + if ($hasB42) { + $total += $b42; + } + $total += $this->nextId() + $a52; + $total += $this->nextId() + $a53; + $total += $this->nextId() + $a54; + $total += $this->nextId() + $a55; + if ($hasB43) { + $total += $b43; + } + $total += $this->nextId() + $a56; + $total += $this->nextId() + $a57; + $total += $this->nextId() + $a58; + $total += $this->nextId() + $a59; + if ($hasB44) { + $total += $b44; + } + $total += $this->nextId() + $a0; + $total += $this->nextId() + $a1; + $total += $this->nextId() + $a2; + $total += $this->nextId() + $a3; + if ($hasB45) { + $total += $b45; + } + $total += $this->nextId() + $a4; + $total += $this->nextId() + $a5; + $total += $this->nextId() + $a6; + $total += $this->nextId() + $a7; + if ($hasB46) { + $total += $b46; + } + $total += $this->nextId() + $a8; + $total += $this->nextId() + $a9; + $total += $this->nextId() + $a10; + $total += $this->nextId() + $a11; + if ($hasB47) { + $total += $b47; + } + $total += $this->nextId() + $a12; + $total += $this->nextId() + $a13; + $total += $this->nextId() + $a14; + $total += $this->nextId() + $a15; + if ($hasB48) { + $total += $b48; + } + $total += $this->nextId() + $a16; + $total += $this->nextId() + $a17; + $total += $this->nextId() + $a18; + $total += $this->nextId() + $a19; + if ($hasB49) { + $total += $b49; + } + $total += $this->nextId() + $a20; + $total += $this->nextId() + $a21; + $total += $this->nextId() + $a22; + $total += $this->nextId() + $a23; + if ($hasB50) { + $total += $b50; + } + $total += $this->nextId() + $a24; + $total += $this->nextId() + $a25; + $total += $this->nextId() + $a26; + $total += $this->nextId() + $a27; + if ($hasB51) { + $total += $b51; + } + $total += $this->nextId() + $a28; + $total += $this->nextId() + $a29; + $total += $this->nextId() + $a30; + $total += $this->nextId() + $a31; + if ($hasB52) { + $total += $b52; + } + $total += $this->nextId() + $a32; + $total += $this->nextId() + $a33; + $total += $this->nextId() + $a34; + $total += $this->nextId() + $a35; + if ($hasB53) { + $total += $b53; + } + $total += $this->nextId() + $a36; + $total += $this->nextId() + $a37; + $total += $this->nextId() + $a38; + $total += $this->nextId() + $a39; + if ($hasB54) { + $total += $b54; + } + $total += $this->nextId() + $a40; + $total += $this->nextId() + $a41; + $total += $this->nextId() + $a42; + $total += $this->nextId() + $a43; + if ($hasB55) { + $total += $b55; + } + $total += $this->nextId() + $a44; + $total += $this->nextId() + $a45; + $total += $this->nextId() + $a46; + $total += $this->nextId() + $a47; + if ($hasB56) { + $total += $b56; + } + $total += $this->nextId() + $a48; + $total += $this->nextId() + $a49; + $total += $this->nextId() + $a50; + $total += $this->nextId() + $a51; + if ($hasB57) { + $total += $b57; + } + $total += $this->nextId() + $a52; + $total += $this->nextId() + $a53; + $total += $this->nextId() + $a54; + $total += $this->nextId() + $a55; + if ($hasB58) { + $total += $b58; + } + $total += $this->nextId() + $a56; + $total += $this->nextId() + $a57; + $total += $this->nextId() + $a58; + $total += $this->nextId() + $a59; + if ($hasB59) { + $total += $b59; + } + $total += $this->nextId() + $a0; + $total += $this->nextId() + $a1; + $total += $this->nextId() + $a2; + $total += $this->nextId() + $a3; + if ($hasB0) { + $total += $b0; + } + $total += $this->nextId() + $a4; + $total += $this->nextId() + $a5; + $total += $this->nextId() + $a6; + $total += $this->nextId() + $a7; + if ($hasB1) { + $total += $b1; + } + $total += $this->nextId() + $a8; + $total += $this->nextId() + $a9; + $total += $this->nextId() + $a10; + $total += $this->nextId() + $a11; + if ($hasB2) { + $total += $b2; + } + $total += $this->nextId() + $a12; + $total += $this->nextId() + $a13; + $total += $this->nextId() + $a14; + $total += $this->nextId() + $a15; + if ($hasB3) { + $total += $b3; + } + $total += $this->nextId() + $a16; + $total += $this->nextId() + $a17; + $total += $this->nextId() + $a18; + $total += $this->nextId() + $a19; + if ($hasB4) { + $total += $b4; + } + $total += $this->nextId() + $a20; + $total += $this->nextId() + $a21; + $total += $this->nextId() + $a22; + $total += $this->nextId() + $a23; + if ($hasB5) { + $total += $b5; + } + $total += $this->nextId() + $a24; + $total += $this->nextId() + $a25; + $total += $this->nextId() + $a26; + $total += $this->nextId() + $a27; + if ($hasB6) { + $total += $b6; + } + $total += $this->nextId() + $a28; + $total += $this->nextId() + $a29; + $total += $this->nextId() + $a30; + $total += $this->nextId() + $a31; + if ($hasB7) { + $total += $b7; + } + $total += $this->nextId() + $a32; + $total += $this->nextId() + $a33; + $total += $this->nextId() + $a34; + $total += $this->nextId() + $a35; + if ($hasB8) { + $total += $b8; + } + $total += $this->nextId() + $a36; + $total += $this->nextId() + $a37; + $total += $this->nextId() + $a38; + $total += $this->nextId() + $a39; + if ($hasB9) { + $total += $b9; + } + + return $total; + } + +} diff --git a/tests/bench/data/possibly-impure-calls-remember-properties.php b/tests/bench/data/possibly-impure-calls-remember-properties.php new file mode 100644 index 00000000000..6619150b25f --- /dev/null +++ b/tests/bench/data/possibly-impure-calls-remember-properties.php @@ -0,0 +1,2171 @@ +label0 = 'label'; + $this->label1 = 'label'; + $this->label2 = 'label'; + $this->label3 = 'label'; + } + + private function nextId(): int + { + return ++$this->counter; + } + + public function build( + ?int $a0, + ?int $b0, + ?int $a1, + ?int $b1, + ?int $a2, + ?int $b2, + ?int $a3, + ?int $b3, + ?int $a4, + ?int $b4, + ?int $a5, + ?int $b5, + ?int $a6, + ?int $b6, + ?int $a7, + ?int $b7, + ?int $a8, + ?int $b8, + ?int $a9, + ?int $b9, + ?int $a10, + ?int $b10, + ?int $a11, + ?int $b11, + ?int $a12, + ?int $b12, + ?int $a13, + ?int $b13, + ?int $a14, + ?int $b14, + ?int $a15, + ?int $b15, + ?int $a16, + ?int $b16, + ?int $a17, + ?int $b17, + ?int $a18, + ?int $b18, + ?int $a19, + ?int $b19, + ?int $a20, + ?int $b20, + ?int $a21, + ?int $b21, + ?int $a22, + ?int $b22, + ?int $a23, + ?int $b23, + ?int $a24, + ?int $b24, + ?int $a25, + ?int $b25, + ?int $a26, + ?int $b26, + ?int $a27, + ?int $b27, + ?int $a28, + ?int $b28, + ?int $a29, + ?int $b29, + ?int $a30, + ?int $b30, + ?int $a31, + ?int $b31, + ?int $a32, + ?int $b32, + ?int $a33, + ?int $b33, + ?int $a34, + ?int $b34, + ?int $a35, + ?int $b35, + ?int $a36, + ?int $b36, + ?int $a37, + ?int $b37, + ?int $a38, + ?int $b38, + ?int $a39, + ?int $b39, + ?int $a40, + ?int $b40, + ?int $a41, + ?int $b41, + ?int $a42, + ?int $b42, + ?int $a43, + ?int $b43, + ?int $a44, + ?int $b44, + ?int $a45, + ?int $b45, + ?int $a46, + ?int $b46, + ?int $a47, + ?int $b47, + ?int $a48, + ?int $b48, + ?int $a49, + ?int $b49, + ?int $a50, + ?int $b50, + ?int $a51, + ?int $b51, + ?int $a52, + ?int $b52, + ?int $a53, + ?int $b53, + ?int $a54, + ?int $b54, + ?int $a55, + ?int $b55, + ?int $a56, + ?int $b56, + ?int $a57, + ?int $b57, + ?int $a58, + ?int $b58, + ?int $a59, + ?int $b59, + ): int + { + if ($this->label0 === null) { + return 0; + } + if ($this->label1 === null) { + return 0; + } + if ($this->label2 === null) { + return 0; + } + if ($this->label3 === null) { + return 0; + } + if ($a0 === null) { + return 0; + } + if ($a1 === null) { + return 0; + } + if ($a2 === null) { + return 0; + } + if ($a3 === null) { + return 0; + } + if ($a4 === null) { + return 0; + } + if ($a5 === null) { + return 0; + } + if ($a6 === null) { + return 0; + } + if ($a7 === null) { + return 0; + } + if ($a8 === null) { + return 0; + } + if ($a9 === null) { + return 0; + } + if ($a10 === null) { + return 0; + } + if ($a11 === null) { + return 0; + } + if ($a12 === null) { + return 0; + } + if ($a13 === null) { + return 0; + } + if ($a14 === null) { + return 0; + } + if ($a15 === null) { + return 0; + } + if ($a16 === null) { + return 0; + } + if ($a17 === null) { + return 0; + } + if ($a18 === null) { + return 0; + } + if ($a19 === null) { + return 0; + } + if ($a20 === null) { + return 0; + } + if ($a21 === null) { + return 0; + } + if ($a22 === null) { + return 0; + } + if ($a23 === null) { + return 0; + } + if ($a24 === null) { + return 0; + } + if ($a25 === null) { + return 0; + } + if ($a26 === null) { + return 0; + } + if ($a27 === null) { + return 0; + } + if ($a28 === null) { + return 0; + } + if ($a29 === null) { + return 0; + } + if ($a30 === null) { + return 0; + } + if ($a31 === null) { + return 0; + } + if ($a32 === null) { + return 0; + } + if ($a33 === null) { + return 0; + } + if ($a34 === null) { + return 0; + } + if ($a35 === null) { + return 0; + } + if ($a36 === null) { + return 0; + } + if ($a37 === null) { + return 0; + } + if ($a38 === null) { + return 0; + } + if ($a39 === null) { + return 0; + } + if ($a40 === null) { + return 0; + } + if ($a41 === null) { + return 0; + } + if ($a42 === null) { + return 0; + } + if ($a43 === null) { + return 0; + } + if ($a44 === null) { + return 0; + } + if ($a45 === null) { + return 0; + } + if ($a46 === null) { + return 0; + } + if ($a47 === null) { + return 0; + } + if ($a48 === null) { + return 0; + } + if ($a49 === null) { + return 0; + } + if ($a50 === null) { + return 0; + } + if ($a51 === null) { + return 0; + } + if ($a52 === null) { + return 0; + } + if ($a53 === null) { + return 0; + } + if ($a54 === null) { + return 0; + } + if ($a55 === null) { + return 0; + } + if ($a56 === null) { + return 0; + } + if ($a57 === null) { + return 0; + } + if ($a58 === null) { + return 0; + } + if ($a59 === null) { + return 0; + } + $hasB0 = $b0 !== null; + $hasB1 = $b1 !== null; + $hasB2 = $b2 !== null; + $hasB3 = $b3 !== null; + $hasB4 = $b4 !== null; + $hasB5 = $b5 !== null; + $hasB6 = $b6 !== null; + $hasB7 = $b7 !== null; + $hasB8 = $b8 !== null; + $hasB9 = $b9 !== null; + $hasB10 = $b10 !== null; + $hasB11 = $b11 !== null; + $hasB12 = $b12 !== null; + $hasB13 = $b13 !== null; + $hasB14 = $b14 !== null; + $hasB15 = $b15 !== null; + $hasB16 = $b16 !== null; + $hasB17 = $b17 !== null; + $hasB18 = $b18 !== null; + $hasB19 = $b19 !== null; + $hasB20 = $b20 !== null; + $hasB21 = $b21 !== null; + $hasB22 = $b22 !== null; + $hasB23 = $b23 !== null; + $hasB24 = $b24 !== null; + $hasB25 = $b25 !== null; + $hasB26 = $b26 !== null; + $hasB27 = $b27 !== null; + $hasB28 = $b28 !== null; + $hasB29 = $b29 !== null; + $hasB30 = $b30 !== null; + $hasB31 = $b31 !== null; + $hasB32 = $b32 !== null; + $hasB33 = $b33 !== null; + $hasB34 = $b34 !== null; + $hasB35 = $b35 !== null; + $hasB36 = $b36 !== null; + $hasB37 = $b37 !== null; + $hasB38 = $b38 !== null; + $hasB39 = $b39 !== null; + $hasB40 = $b40 !== null; + $hasB41 = $b41 !== null; + $hasB42 = $b42 !== null; + $hasB43 = $b43 !== null; + $hasB44 = $b44 !== null; + $hasB45 = $b45 !== null; + $hasB46 = $b46 !== null; + $hasB47 = $b47 !== null; + $hasB48 = $b48 !== null; + $hasB49 = $b49 !== null; + $hasB50 = $b50 !== null; + $hasB51 = $b51 !== null; + $hasB52 = $b52 !== null; + $hasB53 = $b53 !== null; + $hasB54 = $b54 !== null; + $hasB55 = $b55 !== null; + $hasB56 = $b56 !== null; + $hasB57 = $b57 !== null; + $hasB58 = $b58 !== null; + $hasB59 = $b59 !== null; + + $total = 0; + $total += $this->nextId() + $a0; + $total += $this->nextId() + $a1; + $total += $this->nextId() + $a2; + $total += $this->nextId() + $a3; + if ($hasB0) { + $total += $b0; + } + $total += $this->nextId() + $a4; + $total += $this->nextId() + $a5; + $total += $this->nextId() + $a6; + $total += $this->nextId() + $a7; + if ($hasB1) { + $total += $b1; + } + $total += $this->nextId() + $a8; + $total += $this->nextId() + $a9; + $total += $this->nextId() + $a10; + $total += $this->nextId() + $a11; + if ($hasB2) { + $total += $b2; + } + $total += $this->nextId() + $a12; + $total += $this->nextId() + $a13; + $total += $this->nextId() + $a14; + $total += $this->nextId() + $a15; + if ($hasB3) { + $total += $b3; + } + $total += $this->nextId() + $a16; + $total += $this->nextId() + $a17; + $total += $this->nextId() + $a18; + $total += $this->nextId() + $a19; + if ($hasB4) { + $total += $b4; + } + $total += $this->nextId() + $a20; + $total += $this->nextId() + $a21; + $total += $this->nextId() + $a22; + $total += $this->nextId() + $a23; + if ($hasB5) { + $total += $b5; + } + $total += $this->nextId() + $a24; + $total += $this->nextId() + $a25; + $total += $this->nextId() + $a26; + $total += $this->nextId() + $a27; + if ($hasB6) { + $total += $b6; + } + $total += $this->nextId() + $a28; + $total += $this->nextId() + $a29; + $total += $this->nextId() + $a30; + $total += $this->nextId() + $a31; + if ($hasB7) { + $total += $b7; + } + $total += $this->nextId() + $a32; + $total += $this->nextId() + $a33; + $total += $this->nextId() + $a34; + $total += $this->nextId() + $a35; + if ($hasB8) { + $total += $b8; + } + $total += $this->nextId() + $a36; + $total += $this->nextId() + $a37; + $total += $this->nextId() + $a38; + $total += $this->nextId() + $a39; + if ($hasB9) { + $total += $b9; + } + $total += $this->nextId() + $a40; + $total += $this->nextId() + $a41; + $total += $this->nextId() + $a42; + $total += $this->nextId() + $a43; + if ($hasB10) { + $total += $b10; + } + $total += $this->nextId() + $a44; + $total += $this->nextId() + $a45; + $total += $this->nextId() + $a46; + $total += $this->nextId() + $a47; + if ($hasB11) { + $total += $b11; + } + $total += $this->nextId() + $a48; + $total += $this->nextId() + $a49; + $total += $this->nextId() + $a50; + $total += $this->nextId() + $a51; + if ($hasB12) { + $total += $b12; + } + $total += $this->nextId() + $a52; + $total += $this->nextId() + $a53; + $total += $this->nextId() + $a54; + $total += $this->nextId() + $a55; + if ($hasB13) { + $total += $b13; + } + $total += $this->nextId() + $a56; + $total += $this->nextId() + $a57; + $total += $this->nextId() + $a58; + $total += $this->nextId() + $a59; + if ($hasB14) { + $total += $b14; + } + $total += $this->nextId() + $a0; + $total += $this->nextId() + $a1; + $total += $this->nextId() + $a2; + $total += $this->nextId() + $a3; + if ($hasB15) { + $total += $b15; + } + $total += $this->nextId() + $a4; + $total += $this->nextId() + $a5; + $total += $this->nextId() + $a6; + $total += $this->nextId() + $a7; + if ($hasB16) { + $total += $b16; + } + $total += $this->nextId() + $a8; + $total += $this->nextId() + $a9; + $total += $this->nextId() + $a10; + $total += $this->nextId() + $a11; + if ($hasB17) { + $total += $b17; + } + $total += $this->nextId() + $a12; + $total += $this->nextId() + $a13; + $total += $this->nextId() + $a14; + $total += $this->nextId() + $a15; + if ($hasB18) { + $total += $b18; + } + $total += $this->nextId() + $a16; + $total += $this->nextId() + $a17; + $total += $this->nextId() + $a18; + $total += $this->nextId() + $a19; + if ($hasB19) { + $total += $b19; + } + $total += $this->nextId() + $a20; + $total += $this->nextId() + $a21; + $total += $this->nextId() + $a22; + $total += $this->nextId() + $a23; + if ($hasB20) { + $total += $b20; + } + $total += $this->nextId() + $a24; + $total += $this->nextId() + $a25; + $total += $this->nextId() + $a26; + $total += $this->nextId() + $a27; + if ($hasB21) { + $total += $b21; + } + $total += $this->nextId() + $a28; + $total += $this->nextId() + $a29; + $total += $this->nextId() + $a30; + $total += $this->nextId() + $a31; + if ($hasB22) { + $total += $b22; + } + $total += $this->nextId() + $a32; + $total += $this->nextId() + $a33; + $total += $this->nextId() + $a34; + $total += $this->nextId() + $a35; + if ($hasB23) { + $total += $b23; + } + $total += $this->nextId() + $a36; + $total += $this->nextId() + $a37; + $total += $this->nextId() + $a38; + $total += $this->nextId() + $a39; + if ($hasB24) { + $total += $b24; + } + $total += $this->nextId() + $a40; + $total += $this->nextId() + $a41; + $total += $this->nextId() + $a42; + $total += $this->nextId() + $a43; + if ($hasB25) { + $total += $b25; + } + $total += $this->nextId() + $a44; + $total += $this->nextId() + $a45; + $total += $this->nextId() + $a46; + $total += $this->nextId() + $a47; + if ($hasB26) { + $total += $b26; + } + $total += $this->nextId() + $a48; + $total += $this->nextId() + $a49; + $total += $this->nextId() + $a50; + $total += $this->nextId() + $a51; + if ($hasB27) { + $total += $b27; + } + $total += $this->nextId() + $a52; + $total += $this->nextId() + $a53; + $total += $this->nextId() + $a54; + $total += $this->nextId() + $a55; + if ($hasB28) { + $total += $b28; + } + $total += $this->nextId() + $a56; + $total += $this->nextId() + $a57; + $total += $this->nextId() + $a58; + $total += $this->nextId() + $a59; + if ($hasB29) { + $total += $b29; + } + $total += $this->nextId() + $a0; + $total += $this->nextId() + $a1; + $total += $this->nextId() + $a2; + $total += $this->nextId() + $a3; + if ($hasB30) { + $total += $b30; + } + $total += $this->nextId() + $a4; + $total += $this->nextId() + $a5; + $total += $this->nextId() + $a6; + $total += $this->nextId() + $a7; + if ($hasB31) { + $total += $b31; + } + $total += $this->nextId() + $a8; + $total += $this->nextId() + $a9; + $total += $this->nextId() + $a10; + $total += $this->nextId() + $a11; + if ($hasB32) { + $total += $b32; + } + $total += $this->nextId() + $a12; + $total += $this->nextId() + $a13; + $total += $this->nextId() + $a14; + $total += $this->nextId() + $a15; + if ($hasB33) { + $total += $b33; + } + $total += $this->nextId() + $a16; + $total += $this->nextId() + $a17; + $total += $this->nextId() + $a18; + $total += $this->nextId() + $a19; + if ($hasB34) { + $total += $b34; + } + $total += $this->nextId() + $a20; + $total += $this->nextId() + $a21; + $total += $this->nextId() + $a22; + $total += $this->nextId() + $a23; + if ($hasB35) { + $total += $b35; + } + $total += $this->nextId() + $a24; + $total += $this->nextId() + $a25; + $total += $this->nextId() + $a26; + $total += $this->nextId() + $a27; + if ($hasB36) { + $total += $b36; + } + $total += $this->nextId() + $a28; + $total += $this->nextId() + $a29; + $total += $this->nextId() + $a30; + $total += $this->nextId() + $a31; + if ($hasB37) { + $total += $b37; + } + $total += $this->nextId() + $a32; + $total += $this->nextId() + $a33; + $total += $this->nextId() + $a34; + $total += $this->nextId() + $a35; + if ($hasB38) { + $total += $b38; + } + $total += $this->nextId() + $a36; + $total += $this->nextId() + $a37; + $total += $this->nextId() + $a38; + $total += $this->nextId() + $a39; + if ($hasB39) { + $total += $b39; + } + $total += $this->nextId() + $a40; + $total += $this->nextId() + $a41; + $total += $this->nextId() + $a42; + $total += $this->nextId() + $a43; + if ($hasB40) { + $total += $b40; + } + $total += $this->nextId() + $a44; + $total += $this->nextId() + $a45; + $total += $this->nextId() + $a46; + $total += $this->nextId() + $a47; + if ($hasB41) { + $total += $b41; + } + $total += $this->nextId() + $a48; + $total += $this->nextId() + $a49; + $total += $this->nextId() + $a50; + $total += $this->nextId() + $a51; + if ($hasB42) { + $total += $b42; + } + $total += $this->nextId() + $a52; + $total += $this->nextId() + $a53; + $total += $this->nextId() + $a54; + $total += $this->nextId() + $a55; + if ($hasB43) { + $total += $b43; + } + $total += $this->nextId() + $a56; + $total += $this->nextId() + $a57; + $total += $this->nextId() + $a58; + $total += $this->nextId() + $a59; + if ($hasB44) { + $total += $b44; + } + $total += $this->nextId() + $a0; + $total += $this->nextId() + $a1; + $total += $this->nextId() + $a2; + $total += $this->nextId() + $a3; + if ($hasB45) { + $total += $b45; + } + $total += $this->nextId() + $a4; + $total += $this->nextId() + $a5; + $total += $this->nextId() + $a6; + $total += $this->nextId() + $a7; + if ($hasB46) { + $total += $b46; + } + $total += $this->nextId() + $a8; + $total += $this->nextId() + $a9; + $total += $this->nextId() + $a10; + $total += $this->nextId() + $a11; + if ($hasB47) { + $total += $b47; + } + $total += $this->nextId() + $a12; + $total += $this->nextId() + $a13; + $total += $this->nextId() + $a14; + $total += $this->nextId() + $a15; + if ($hasB48) { + $total += $b48; + } + $total += $this->nextId() + $a16; + $total += $this->nextId() + $a17; + $total += $this->nextId() + $a18; + $total += $this->nextId() + $a19; + if ($hasB49) { + $total += $b49; + } + $total += $this->nextId() + $a20; + $total += $this->nextId() + $a21; + $total += $this->nextId() + $a22; + $total += $this->nextId() + $a23; + if ($hasB50) { + $total += $b50; + } + $total += $this->nextId() + $a24; + $total += $this->nextId() + $a25; + $total += $this->nextId() + $a26; + $total += $this->nextId() + $a27; + if ($hasB51) { + $total += $b51; + } + $total += $this->nextId() + $a28; + $total += $this->nextId() + $a29; + $total += $this->nextId() + $a30; + $total += $this->nextId() + $a31; + if ($hasB52) { + $total += $b52; + } + $total += $this->nextId() + $a32; + $total += $this->nextId() + $a33; + $total += $this->nextId() + $a34; + $total += $this->nextId() + $a35; + if ($hasB53) { + $total += $b53; + } + $total += $this->nextId() + $a36; + $total += $this->nextId() + $a37; + $total += $this->nextId() + $a38; + $total += $this->nextId() + $a39; + if ($hasB54) { + $total += $b54; + } + $total += $this->nextId() + $a40; + $total += $this->nextId() + $a41; + $total += $this->nextId() + $a42; + $total += $this->nextId() + $a43; + if ($hasB55) { + $total += $b55; + } + $total += $this->nextId() + $a44; + $total += $this->nextId() + $a45; + $total += $this->nextId() + $a46; + $total += $this->nextId() + $a47; + if ($hasB56) { + $total += $b56; + } + $total += $this->nextId() + $a48; + $total += $this->nextId() + $a49; + $total += $this->nextId() + $a50; + $total += $this->nextId() + $a51; + if ($hasB57) { + $total += $b57; + } + $total += $this->nextId() + $a52; + $total += $this->nextId() + $a53; + $total += $this->nextId() + $a54; + $total += $this->nextId() + $a55; + if ($hasB58) { + $total += $b58; + } + $total += $this->nextId() + $a56; + $total += $this->nextId() + $a57; + $total += $this->nextId() + $a58; + $total += $this->nextId() + $a59; + if ($hasB59) { + $total += $b59; + } + $total += $this->nextId() + $a0; + $total += $this->nextId() + $a1; + $total += $this->nextId() + $a2; + $total += $this->nextId() + $a3; + if ($hasB0) { + $total += $b0; + } + $total += $this->nextId() + $a4; + $total += $this->nextId() + $a5; + $total += $this->nextId() + $a6; + $total += $this->nextId() + $a7; + if ($hasB1) { + $total += $b1; + } + $total += $this->nextId() + $a8; + $total += $this->nextId() + $a9; + $total += $this->nextId() + $a10; + $total += $this->nextId() + $a11; + if ($hasB2) { + $total += $b2; + } + $total += $this->nextId() + $a12; + $total += $this->nextId() + $a13; + $total += $this->nextId() + $a14; + $total += $this->nextId() + $a15; + if ($hasB3) { + $total += $b3; + } + $total += $this->nextId() + $a16; + $total += $this->nextId() + $a17; + $total += $this->nextId() + $a18; + $total += $this->nextId() + $a19; + if ($hasB4) { + $total += $b4; + } + $total += $this->nextId() + $a20; + $total += $this->nextId() + $a21; + $total += $this->nextId() + $a22; + $total += $this->nextId() + $a23; + if ($hasB5) { + $total += $b5; + } + $total += $this->nextId() + $a24; + $total += $this->nextId() + $a25; + $total += $this->nextId() + $a26; + $total += $this->nextId() + $a27; + if ($hasB6) { + $total += $b6; + } + $total += $this->nextId() + $a28; + $total += $this->nextId() + $a29; + $total += $this->nextId() + $a30; + $total += $this->nextId() + $a31; + if ($hasB7) { + $total += $b7; + } + $total += $this->nextId() + $a32; + $total += $this->nextId() + $a33; + $total += $this->nextId() + $a34; + $total += $this->nextId() + $a35; + if ($hasB8) { + $total += $b8; + } + $total += $this->nextId() + $a36; + $total += $this->nextId() + $a37; + $total += $this->nextId() + $a38; + $total += $this->nextId() + $a39; + if ($hasB9) { + $total += $b9; + } + $total += $this->nextId() + $a40; + $total += $this->nextId() + $a41; + $total += $this->nextId() + $a42; + $total += $this->nextId() + $a43; + if ($hasB10) { + $total += $b10; + } + $total += $this->nextId() + $a44; + $total += $this->nextId() + $a45; + $total += $this->nextId() + $a46; + $total += $this->nextId() + $a47; + if ($hasB11) { + $total += $b11; + } + $total += $this->nextId() + $a48; + $total += $this->nextId() + $a49; + $total += $this->nextId() + $a50; + $total += $this->nextId() + $a51; + if ($hasB12) { + $total += $b12; + } + $total += $this->nextId() + $a52; + $total += $this->nextId() + $a53; + $total += $this->nextId() + $a54; + $total += $this->nextId() + $a55; + if ($hasB13) { + $total += $b13; + } + $total += $this->nextId() + $a56; + $total += $this->nextId() + $a57; + $total += $this->nextId() + $a58; + $total += $this->nextId() + $a59; + if ($hasB14) { + $total += $b14; + } + $total += $this->nextId() + $a0; + $total += $this->nextId() + $a1; + $total += $this->nextId() + $a2; + $total += $this->nextId() + $a3; + if ($hasB15) { + $total += $b15; + } + $total += $this->nextId() + $a4; + $total += $this->nextId() + $a5; + $total += $this->nextId() + $a6; + $total += $this->nextId() + $a7; + if ($hasB16) { + $total += $b16; + } + $total += $this->nextId() + $a8; + $total += $this->nextId() + $a9; + $total += $this->nextId() + $a10; + $total += $this->nextId() + $a11; + if ($hasB17) { + $total += $b17; + } + $total += $this->nextId() + $a12; + $total += $this->nextId() + $a13; + $total += $this->nextId() + $a14; + $total += $this->nextId() + $a15; + if ($hasB18) { + $total += $b18; + } + $total += $this->nextId() + $a16; + $total += $this->nextId() + $a17; + $total += $this->nextId() + $a18; + $total += $this->nextId() + $a19; + if ($hasB19) { + $total += $b19; + } + $total += $this->nextId() + $a20; + $total += $this->nextId() + $a21; + $total += $this->nextId() + $a22; + $total += $this->nextId() + $a23; + if ($hasB20) { + $total += $b20; + } + $total += $this->nextId() + $a24; + $total += $this->nextId() + $a25; + $total += $this->nextId() + $a26; + $total += $this->nextId() + $a27; + if ($hasB21) { + $total += $b21; + } + $total += $this->nextId() + $a28; + $total += $this->nextId() + $a29; + $total += $this->nextId() + $a30; + $total += $this->nextId() + $a31; + if ($hasB22) { + $total += $b22; + } + $total += $this->nextId() + $a32; + $total += $this->nextId() + $a33; + $total += $this->nextId() + $a34; + $total += $this->nextId() + $a35; + if ($hasB23) { + $total += $b23; + } + $total += $this->nextId() + $a36; + $total += $this->nextId() + $a37; + $total += $this->nextId() + $a38; + $total += $this->nextId() + $a39; + if ($hasB24) { + $total += $b24; + } + $total += $this->nextId() + $a40; + $total += $this->nextId() + $a41; + $total += $this->nextId() + $a42; + $total += $this->nextId() + $a43; + if ($hasB25) { + $total += $b25; + } + $total += $this->nextId() + $a44; + $total += $this->nextId() + $a45; + $total += $this->nextId() + $a46; + $total += $this->nextId() + $a47; + if ($hasB26) { + $total += $b26; + } + $total += $this->nextId() + $a48; + $total += $this->nextId() + $a49; + $total += $this->nextId() + $a50; + $total += $this->nextId() + $a51; + if ($hasB27) { + $total += $b27; + } + $total += $this->nextId() + $a52; + $total += $this->nextId() + $a53; + $total += $this->nextId() + $a54; + $total += $this->nextId() + $a55; + if ($hasB28) { + $total += $b28; + } + $total += $this->nextId() + $a56; + $total += $this->nextId() + $a57; + $total += $this->nextId() + $a58; + $total += $this->nextId() + $a59; + if ($hasB29) { + $total += $b29; + } + $total += $this->nextId() + $a0; + $total += $this->nextId() + $a1; + $total += $this->nextId() + $a2; + $total += $this->nextId() + $a3; + if ($hasB30) { + $total += $b30; + } + $total += $this->nextId() + $a4; + $total += $this->nextId() + $a5; + $total += $this->nextId() + $a6; + $total += $this->nextId() + $a7; + if ($hasB31) { + $total += $b31; + } + $total += $this->nextId() + $a8; + $total += $this->nextId() + $a9; + $total += $this->nextId() + $a10; + $total += $this->nextId() + $a11; + if ($hasB32) { + $total += $b32; + } + $total += $this->nextId() + $a12; + $total += $this->nextId() + $a13; + $total += $this->nextId() + $a14; + $total += $this->nextId() + $a15; + if ($hasB33) { + $total += $b33; + } + $total += $this->nextId() + $a16; + $total += $this->nextId() + $a17; + $total += $this->nextId() + $a18; + $total += $this->nextId() + $a19; + if ($hasB34) { + $total += $b34; + } + $total += $this->nextId() + $a20; + $total += $this->nextId() + $a21; + $total += $this->nextId() + $a22; + $total += $this->nextId() + $a23; + if ($hasB35) { + $total += $b35; + } + $total += $this->nextId() + $a24; + $total += $this->nextId() + $a25; + $total += $this->nextId() + $a26; + $total += $this->nextId() + $a27; + if ($hasB36) { + $total += $b36; + } + $total += $this->nextId() + $a28; + $total += $this->nextId() + $a29; + $total += $this->nextId() + $a30; + $total += $this->nextId() + $a31; + if ($hasB37) { + $total += $b37; + } + $total += $this->nextId() + $a32; + $total += $this->nextId() + $a33; + $total += $this->nextId() + $a34; + $total += $this->nextId() + $a35; + if ($hasB38) { + $total += $b38; + } + $total += $this->nextId() + $a36; + $total += $this->nextId() + $a37; + $total += $this->nextId() + $a38; + $total += $this->nextId() + $a39; + if ($hasB39) { + $total += $b39; + } + $total += $this->nextId() + $a40; + $total += $this->nextId() + $a41; + $total += $this->nextId() + $a42; + $total += $this->nextId() + $a43; + if ($hasB40) { + $total += $b40; + } + $total += $this->nextId() + $a44; + $total += $this->nextId() + $a45; + $total += $this->nextId() + $a46; + $total += $this->nextId() + $a47; + if ($hasB41) { + $total += $b41; + } + $total += $this->nextId() + $a48; + $total += $this->nextId() + $a49; + $total += $this->nextId() + $a50; + $total += $this->nextId() + $a51; + if ($hasB42) { + $total += $b42; + } + $total += $this->nextId() + $a52; + $total += $this->nextId() + $a53; + $total += $this->nextId() + $a54; + $total += $this->nextId() + $a55; + if ($hasB43) { + $total += $b43; + } + $total += $this->nextId() + $a56; + $total += $this->nextId() + $a57; + $total += $this->nextId() + $a58; + $total += $this->nextId() + $a59; + if ($hasB44) { + $total += $b44; + } + $total += $this->nextId() + $a0; + $total += $this->nextId() + $a1; + $total += $this->nextId() + $a2; + $total += $this->nextId() + $a3; + if ($hasB45) { + $total += $b45; + } + $total += $this->nextId() + $a4; + $total += $this->nextId() + $a5; + $total += $this->nextId() + $a6; + $total += $this->nextId() + $a7; + if ($hasB46) { + $total += $b46; + } + $total += $this->nextId() + $a8; + $total += $this->nextId() + $a9; + $total += $this->nextId() + $a10; + $total += $this->nextId() + $a11; + if ($hasB47) { + $total += $b47; + } + $total += $this->nextId() + $a12; + $total += $this->nextId() + $a13; + $total += $this->nextId() + $a14; + $total += $this->nextId() + $a15; + if ($hasB48) { + $total += $b48; + } + $total += $this->nextId() + $a16; + $total += $this->nextId() + $a17; + $total += $this->nextId() + $a18; + $total += $this->nextId() + $a19; + if ($hasB49) { + $total += $b49; + } + $total += $this->nextId() + $a20; + $total += $this->nextId() + $a21; + $total += $this->nextId() + $a22; + $total += $this->nextId() + $a23; + if ($hasB50) { + $total += $b50; + } + $total += $this->nextId() + $a24; + $total += $this->nextId() + $a25; + $total += $this->nextId() + $a26; + $total += $this->nextId() + $a27; + if ($hasB51) { + $total += $b51; + } + $total += $this->nextId() + $a28; + $total += $this->nextId() + $a29; + $total += $this->nextId() + $a30; + $total += $this->nextId() + $a31; + if ($hasB52) { + $total += $b52; + } + $total += $this->nextId() + $a32; + $total += $this->nextId() + $a33; + $total += $this->nextId() + $a34; + $total += $this->nextId() + $a35; + if ($hasB53) { + $total += $b53; + } + $total += $this->nextId() + $a36; + $total += $this->nextId() + $a37; + $total += $this->nextId() + $a38; + $total += $this->nextId() + $a39; + if ($hasB54) { + $total += $b54; + } + $total += $this->nextId() + $a40; + $total += $this->nextId() + $a41; + $total += $this->nextId() + $a42; + $total += $this->nextId() + $a43; + if ($hasB55) { + $total += $b55; + } + $total += $this->nextId() + $a44; + $total += $this->nextId() + $a45; + $total += $this->nextId() + $a46; + $total += $this->nextId() + $a47; + if ($hasB56) { + $total += $b56; + } + $total += $this->nextId() + $a48; + $total += $this->nextId() + $a49; + $total += $this->nextId() + $a50; + $total += $this->nextId() + $a51; + if ($hasB57) { + $total += $b57; + } + $total += $this->nextId() + $a52; + $total += $this->nextId() + $a53; + $total += $this->nextId() + $a54; + $total += $this->nextId() + $a55; + if ($hasB58) { + $total += $b58; + } + $total += $this->nextId() + $a56; + $total += $this->nextId() + $a57; + $total += $this->nextId() + $a58; + $total += $this->nextId() + $a59; + if ($hasB59) { + $total += $b59; + } + $total += $this->nextId() + $a0; + $total += $this->nextId() + $a1; + $total += $this->nextId() + $a2; + $total += $this->nextId() + $a3; + if ($hasB0) { + $total += $b0; + } + $total += $this->nextId() + $a4; + $total += $this->nextId() + $a5; + $total += $this->nextId() + $a6; + $total += $this->nextId() + $a7; + if ($hasB1) { + $total += $b1; + } + $total += $this->nextId() + $a8; + $total += $this->nextId() + $a9; + $total += $this->nextId() + $a10; + $total += $this->nextId() + $a11; + if ($hasB2) { + $total += $b2; + } + $total += $this->nextId() + $a12; + $total += $this->nextId() + $a13; + $total += $this->nextId() + $a14; + $total += $this->nextId() + $a15; + if ($hasB3) { + $total += $b3; + } + $total += $this->nextId() + $a16; + $total += $this->nextId() + $a17; + $total += $this->nextId() + $a18; + $total += $this->nextId() + $a19; + if ($hasB4) { + $total += $b4; + } + $total += $this->nextId() + $a20; + $total += $this->nextId() + $a21; + $total += $this->nextId() + $a22; + $total += $this->nextId() + $a23; + if ($hasB5) { + $total += $b5; + } + $total += $this->nextId() + $a24; + $total += $this->nextId() + $a25; + $total += $this->nextId() + $a26; + $total += $this->nextId() + $a27; + if ($hasB6) { + $total += $b6; + } + $total += $this->nextId() + $a28; + $total += $this->nextId() + $a29; + $total += $this->nextId() + $a30; + $total += $this->nextId() + $a31; + if ($hasB7) { + $total += $b7; + } + $total += $this->nextId() + $a32; + $total += $this->nextId() + $a33; + $total += $this->nextId() + $a34; + $total += $this->nextId() + $a35; + if ($hasB8) { + $total += $b8; + } + $total += $this->nextId() + $a36; + $total += $this->nextId() + $a37; + $total += $this->nextId() + $a38; + $total += $this->nextId() + $a39; + if ($hasB9) { + $total += $b9; + } + $total += $this->nextId() + $a40; + $total += $this->nextId() + $a41; + $total += $this->nextId() + $a42; + $total += $this->nextId() + $a43; + if ($hasB10) { + $total += $b10; + } + $total += $this->nextId() + $a44; + $total += $this->nextId() + $a45; + $total += $this->nextId() + $a46; + $total += $this->nextId() + $a47; + if ($hasB11) { + $total += $b11; + } + $total += $this->nextId() + $a48; + $total += $this->nextId() + $a49; + $total += $this->nextId() + $a50; + $total += $this->nextId() + $a51; + if ($hasB12) { + $total += $b12; + } + $total += $this->nextId() + $a52; + $total += $this->nextId() + $a53; + $total += $this->nextId() + $a54; + $total += $this->nextId() + $a55; + if ($hasB13) { + $total += $b13; + } + $total += $this->nextId() + $a56; + $total += $this->nextId() + $a57; + $total += $this->nextId() + $a58; + $total += $this->nextId() + $a59; + if ($hasB14) { + $total += $b14; + } + $total += $this->nextId() + $a0; + $total += $this->nextId() + $a1; + $total += $this->nextId() + $a2; + $total += $this->nextId() + $a3; + if ($hasB15) { + $total += $b15; + } + $total += $this->nextId() + $a4; + $total += $this->nextId() + $a5; + $total += $this->nextId() + $a6; + $total += $this->nextId() + $a7; + if ($hasB16) { + $total += $b16; + } + $total += $this->nextId() + $a8; + $total += $this->nextId() + $a9; + $total += $this->nextId() + $a10; + $total += $this->nextId() + $a11; + if ($hasB17) { + $total += $b17; + } + $total += $this->nextId() + $a12; + $total += $this->nextId() + $a13; + $total += $this->nextId() + $a14; + $total += $this->nextId() + $a15; + if ($hasB18) { + $total += $b18; + } + $total += $this->nextId() + $a16; + $total += $this->nextId() + $a17; + $total += $this->nextId() + $a18; + $total += $this->nextId() + $a19; + if ($hasB19) { + $total += $b19; + } + $total += $this->nextId() + $a20; + $total += $this->nextId() + $a21; + $total += $this->nextId() + $a22; + $total += $this->nextId() + $a23; + if ($hasB20) { + $total += $b20; + } + $total += $this->nextId() + $a24; + $total += $this->nextId() + $a25; + $total += $this->nextId() + $a26; + $total += $this->nextId() + $a27; + if ($hasB21) { + $total += $b21; + } + $total += $this->nextId() + $a28; + $total += $this->nextId() + $a29; + $total += $this->nextId() + $a30; + $total += $this->nextId() + $a31; + if ($hasB22) { + $total += $b22; + } + $total += $this->nextId() + $a32; + $total += $this->nextId() + $a33; + $total += $this->nextId() + $a34; + $total += $this->nextId() + $a35; + if ($hasB23) { + $total += $b23; + } + $total += $this->nextId() + $a36; + $total += $this->nextId() + $a37; + $total += $this->nextId() + $a38; + $total += $this->nextId() + $a39; + if ($hasB24) { + $total += $b24; + } + $total += $this->nextId() + $a40; + $total += $this->nextId() + $a41; + $total += $this->nextId() + $a42; + $total += $this->nextId() + $a43; + if ($hasB25) { + $total += $b25; + } + $total += $this->nextId() + $a44; + $total += $this->nextId() + $a45; + $total += $this->nextId() + $a46; + $total += $this->nextId() + $a47; + if ($hasB26) { + $total += $b26; + } + $total += $this->nextId() + $a48; + $total += $this->nextId() + $a49; + $total += $this->nextId() + $a50; + $total += $this->nextId() + $a51; + if ($hasB27) { + $total += $b27; + } + $total += $this->nextId() + $a52; + $total += $this->nextId() + $a53; + $total += $this->nextId() + $a54; + $total += $this->nextId() + $a55; + if ($hasB28) { + $total += $b28; + } + $total += $this->nextId() + $a56; + $total += $this->nextId() + $a57; + $total += $this->nextId() + $a58; + $total += $this->nextId() + $a59; + if ($hasB29) { + $total += $b29; + } + $total += $this->nextId() + $a0; + $total += $this->nextId() + $a1; + $total += $this->nextId() + $a2; + $total += $this->nextId() + $a3; + if ($hasB30) { + $total += $b30; + } + $total += $this->nextId() + $a4; + $total += $this->nextId() + $a5; + $total += $this->nextId() + $a6; + $total += $this->nextId() + $a7; + if ($hasB31) { + $total += $b31; + } + $total += $this->nextId() + $a8; + $total += $this->nextId() + $a9; + $total += $this->nextId() + $a10; + $total += $this->nextId() + $a11; + if ($hasB32) { + $total += $b32; + } + $total += $this->nextId() + $a12; + $total += $this->nextId() + $a13; + $total += $this->nextId() + $a14; + $total += $this->nextId() + $a15; + if ($hasB33) { + $total += $b33; + } + $total += $this->nextId() + $a16; + $total += $this->nextId() + $a17; + $total += $this->nextId() + $a18; + $total += $this->nextId() + $a19; + if ($hasB34) { + $total += $b34; + } + $total += $this->nextId() + $a20; + $total += $this->nextId() + $a21; + $total += $this->nextId() + $a22; + $total += $this->nextId() + $a23; + if ($hasB35) { + $total += $b35; + } + $total += $this->nextId() + $a24; + $total += $this->nextId() + $a25; + $total += $this->nextId() + $a26; + $total += $this->nextId() + $a27; + if ($hasB36) { + $total += $b36; + } + $total += $this->nextId() + $a28; + $total += $this->nextId() + $a29; + $total += $this->nextId() + $a30; + $total += $this->nextId() + $a31; + if ($hasB37) { + $total += $b37; + } + $total += $this->nextId() + $a32; + $total += $this->nextId() + $a33; + $total += $this->nextId() + $a34; + $total += $this->nextId() + $a35; + if ($hasB38) { + $total += $b38; + } + $total += $this->nextId() + $a36; + $total += $this->nextId() + $a37; + $total += $this->nextId() + $a38; + $total += $this->nextId() + $a39; + if ($hasB39) { + $total += $b39; + } + $total += $this->nextId() + $a40; + $total += $this->nextId() + $a41; + $total += $this->nextId() + $a42; + $total += $this->nextId() + $a43; + if ($hasB40) { + $total += $b40; + } + $total += $this->nextId() + $a44; + $total += $this->nextId() + $a45; + $total += $this->nextId() + $a46; + $total += $this->nextId() + $a47; + if ($hasB41) { + $total += $b41; + } + $total += $this->nextId() + $a48; + $total += $this->nextId() + $a49; + $total += $this->nextId() + $a50; + $total += $this->nextId() + $a51; + if ($hasB42) { + $total += $b42; + } + $total += $this->nextId() + $a52; + $total += $this->nextId() + $a53; + $total += $this->nextId() + $a54; + $total += $this->nextId() + $a55; + if ($hasB43) { + $total += $b43; + } + $total += $this->nextId() + $a56; + $total += $this->nextId() + $a57; + $total += $this->nextId() + $a58; + $total += $this->nextId() + $a59; + if ($hasB44) { + $total += $b44; + } + $total += $this->nextId() + $a0; + $total += $this->nextId() + $a1; + $total += $this->nextId() + $a2; + $total += $this->nextId() + $a3; + if ($hasB45) { + $total += $b45; + } + $total += $this->nextId() + $a4; + $total += $this->nextId() + $a5; + $total += $this->nextId() + $a6; + $total += $this->nextId() + $a7; + if ($hasB46) { + $total += $b46; + } + $total += $this->nextId() + $a8; + $total += $this->nextId() + $a9; + $total += $this->nextId() + $a10; + $total += $this->nextId() + $a11; + if ($hasB47) { + $total += $b47; + } + $total += $this->nextId() + $a12; + $total += $this->nextId() + $a13; + $total += $this->nextId() + $a14; + $total += $this->nextId() + $a15; + if ($hasB48) { + $total += $b48; + } + $total += $this->nextId() + $a16; + $total += $this->nextId() + $a17; + $total += $this->nextId() + $a18; + $total += $this->nextId() + $a19; + if ($hasB49) { + $total += $b49; + } + $total += $this->nextId() + $a20; + $total += $this->nextId() + $a21; + $total += $this->nextId() + $a22; + $total += $this->nextId() + $a23; + if ($hasB50) { + $total += $b50; + } + $total += $this->nextId() + $a24; + $total += $this->nextId() + $a25; + $total += $this->nextId() + $a26; + $total += $this->nextId() + $a27; + if ($hasB51) { + $total += $b51; + } + $total += $this->nextId() + $a28; + $total += $this->nextId() + $a29; + $total += $this->nextId() + $a30; + $total += $this->nextId() + $a31; + if ($hasB52) { + $total += $b52; + } + $total += $this->nextId() + $a32; + $total += $this->nextId() + $a33; + $total += $this->nextId() + $a34; + $total += $this->nextId() + $a35; + if ($hasB53) { + $total += $b53; + } + $total += $this->nextId() + $a36; + $total += $this->nextId() + $a37; + $total += $this->nextId() + $a38; + $total += $this->nextId() + $a39; + if ($hasB54) { + $total += $b54; + } + $total += $this->nextId() + $a40; + $total += $this->nextId() + $a41; + $total += $this->nextId() + $a42; + $total += $this->nextId() + $a43; + if ($hasB55) { + $total += $b55; + } + $total += $this->nextId() + $a44; + $total += $this->nextId() + $a45; + $total += $this->nextId() + $a46; + $total += $this->nextId() + $a47; + if ($hasB56) { + $total += $b56; + } + $total += $this->nextId() + $a48; + $total += $this->nextId() + $a49; + $total += $this->nextId() + $a50; + $total += $this->nextId() + $a51; + if ($hasB57) { + $total += $b57; + } + $total += $this->nextId() + $a52; + $total += $this->nextId() + $a53; + $total += $this->nextId() + $a54; + $total += $this->nextId() + $a55; + if ($hasB58) { + $total += $b58; + } + $total += $this->nextId() + $a56; + $total += $this->nextId() + $a57; + $total += $this->nextId() + $a58; + $total += $this->nextId() + $a59; + if ($hasB59) { + $total += $b59; + } + $total += $this->nextId() + $a0; + $total += $this->nextId() + $a1; + $total += $this->nextId() + $a2; + $total += $this->nextId() + $a3; + if ($hasB0) { + $total += $b0; + } + $total += $this->nextId() + $a4; + $total += $this->nextId() + $a5; + $total += $this->nextId() + $a6; + $total += $this->nextId() + $a7; + if ($hasB1) { + $total += $b1; + } + $total += $this->nextId() + $a8; + $total += $this->nextId() + $a9; + $total += $this->nextId() + $a10; + $total += $this->nextId() + $a11; + if ($hasB2) { + $total += $b2; + } + $total += $this->nextId() + $a12; + $total += $this->nextId() + $a13; + $total += $this->nextId() + $a14; + $total += $this->nextId() + $a15; + if ($hasB3) { + $total += $b3; + } + $total += $this->nextId() + $a16; + $total += $this->nextId() + $a17; + $total += $this->nextId() + $a18; + $total += $this->nextId() + $a19; + if ($hasB4) { + $total += $b4; + } + $total += $this->nextId() + $a20; + $total += $this->nextId() + $a21; + $total += $this->nextId() + $a22; + $total += $this->nextId() + $a23; + if ($hasB5) { + $total += $b5; + } + $total += $this->nextId() + $a24; + $total += $this->nextId() + $a25; + $total += $this->nextId() + $a26; + $total += $this->nextId() + $a27; + if ($hasB6) { + $total += $b6; + } + $total += $this->nextId() + $a28; + $total += $this->nextId() + $a29; + $total += $this->nextId() + $a30; + $total += $this->nextId() + $a31; + if ($hasB7) { + $total += $b7; + } + $total += $this->nextId() + $a32; + $total += $this->nextId() + $a33; + $total += $this->nextId() + $a34; + $total += $this->nextId() + $a35; + if ($hasB8) { + $total += $b8; + } + $total += $this->nextId() + $a36; + $total += $this->nextId() + $a37; + $total += $this->nextId() + $a38; + $total += $this->nextId() + $a39; + if ($hasB9) { + $total += $b9; + } + $total += $this->nextId() + $a40; + $total += $this->nextId() + $a41; + $total += $this->nextId() + $a42; + $total += $this->nextId() + $a43; + if ($hasB10) { + $total += $b10; + } + $total += $this->nextId() + $a44; + $total += $this->nextId() + $a45; + $total += $this->nextId() + $a46; + $total += $this->nextId() + $a47; + if ($hasB11) { + $total += $b11; + } + $total += $this->nextId() + $a48; + $total += $this->nextId() + $a49; + $total += $this->nextId() + $a50; + $total += $this->nextId() + $a51; + if ($hasB12) { + $total += $b12; + } + $total += $this->nextId() + $a52; + $total += $this->nextId() + $a53; + $total += $this->nextId() + $a54; + $total += $this->nextId() + $a55; + if ($hasB13) { + $total += $b13; + } + $total += $this->nextId() + $a56; + $total += $this->nextId() + $a57; + $total += $this->nextId() + $a58; + $total += $this->nextId() + $a59; + if ($hasB14) { + $total += $b14; + } + $total += $this->nextId() + $a0; + $total += $this->nextId() + $a1; + $total += $this->nextId() + $a2; + $total += $this->nextId() + $a3; + if ($hasB15) { + $total += $b15; + } + $total += $this->nextId() + $a4; + $total += $this->nextId() + $a5; + $total += $this->nextId() + $a6; + $total += $this->nextId() + $a7; + if ($hasB16) { + $total += $b16; + } + $total += $this->nextId() + $a8; + $total += $this->nextId() + $a9; + $total += $this->nextId() + $a10; + $total += $this->nextId() + $a11; + if ($hasB17) { + $total += $b17; + } + $total += $this->nextId() + $a12; + $total += $this->nextId() + $a13; + $total += $this->nextId() + $a14; + $total += $this->nextId() + $a15; + if ($hasB18) { + $total += $b18; + } + $total += $this->nextId() + $a16; + $total += $this->nextId() + $a17; + $total += $this->nextId() + $a18; + $total += $this->nextId() + $a19; + if ($hasB19) { + $total += $b19; + } + $total += $this->nextId() + $a20; + $total += $this->nextId() + $a21; + $total += $this->nextId() + $a22; + $total += $this->nextId() + $a23; + if ($hasB20) { + $total += $b20; + } + $total += $this->nextId() + $a24; + $total += $this->nextId() + $a25; + $total += $this->nextId() + $a26; + $total += $this->nextId() + $a27; + if ($hasB21) { + $total += $b21; + } + $total += $this->nextId() + $a28; + $total += $this->nextId() + $a29; + $total += $this->nextId() + $a30; + $total += $this->nextId() + $a31; + if ($hasB22) { + $total += $b22; + } + $total += $this->nextId() + $a32; + $total += $this->nextId() + $a33; + $total += $this->nextId() + $a34; + $total += $this->nextId() + $a35; + if ($hasB23) { + $total += $b23; + } + $total += $this->nextId() + $a36; + $total += $this->nextId() + $a37; + $total += $this->nextId() + $a38; + $total += $this->nextId() + $a39; + if ($hasB24) { + $total += $b24; + } + $total += $this->nextId() + $a40; + $total += $this->nextId() + $a41; + $total += $this->nextId() + $a42; + $total += $this->nextId() + $a43; + if ($hasB25) { + $total += $b25; + } + $total += $this->nextId() + $a44; + $total += $this->nextId() + $a45; + $total += $this->nextId() + $a46; + $total += $this->nextId() + $a47; + if ($hasB26) { + $total += $b26; + } + $total += $this->nextId() + $a48; + $total += $this->nextId() + $a49; + $total += $this->nextId() + $a50; + $total += $this->nextId() + $a51; + if ($hasB27) { + $total += $b27; + } + $total += $this->nextId() + $a52; + $total += $this->nextId() + $a53; + $total += $this->nextId() + $a54; + $total += $this->nextId() + $a55; + if ($hasB28) { + $total += $b28; + } + $total += $this->nextId() + $a56; + $total += $this->nextId() + $a57; + $total += $this->nextId() + $a58; + $total += $this->nextId() + $a59; + if ($hasB29) { + $total += $b29; + } + $total += $this->nextId() + $a0; + $total += $this->nextId() + $a1; + $total += $this->nextId() + $a2; + $total += $this->nextId() + $a3; + if ($hasB30) { + $total += $b30; + } + $total += $this->nextId() + $a4; + $total += $this->nextId() + $a5; + $total += $this->nextId() + $a6; + $total += $this->nextId() + $a7; + if ($hasB31) { + $total += $b31; + } + $total += $this->nextId() + $a8; + $total += $this->nextId() + $a9; + $total += $this->nextId() + $a10; + $total += $this->nextId() + $a11; + if ($hasB32) { + $total += $b32; + } + $total += $this->nextId() + $a12; + $total += $this->nextId() + $a13; + $total += $this->nextId() + $a14; + $total += $this->nextId() + $a15; + if ($hasB33) { + $total += $b33; + } + $total += $this->nextId() + $a16; + $total += $this->nextId() + $a17; + $total += $this->nextId() + $a18; + $total += $this->nextId() + $a19; + if ($hasB34) { + $total += $b34; + } + $total += $this->nextId() + $a20; + $total += $this->nextId() + $a21; + $total += $this->nextId() + $a22; + $total += $this->nextId() + $a23; + if ($hasB35) { + $total += $b35; + } + $total += $this->nextId() + $a24; + $total += $this->nextId() + $a25; + $total += $this->nextId() + $a26; + $total += $this->nextId() + $a27; + if ($hasB36) { + $total += $b36; + } + $total += $this->nextId() + $a28; + $total += $this->nextId() + $a29; + $total += $this->nextId() + $a30; + $total += $this->nextId() + $a31; + if ($hasB37) { + $total += $b37; + } + $total += $this->nextId() + $a32; + $total += $this->nextId() + $a33; + $total += $this->nextId() + $a34; + $total += $this->nextId() + $a35; + if ($hasB38) { + $total += $b38; + } + $total += $this->nextId() + $a36; + $total += $this->nextId() + $a37; + $total += $this->nextId() + $a38; + $total += $this->nextId() + $a39; + if ($hasB39) { + $total += $b39; + } + $total += $this->nextId() + $a40; + $total += $this->nextId() + $a41; + $total += $this->nextId() + $a42; + $total += $this->nextId() + $a43; + if ($hasB40) { + $total += $b40; + } + $total += $this->nextId() + $a44; + $total += $this->nextId() + $a45; + $total += $this->nextId() + $a46; + $total += $this->nextId() + $a47; + if ($hasB41) { + $total += $b41; + } + $total += $this->nextId() + $a48; + $total += $this->nextId() + $a49; + $total += $this->nextId() + $a50; + $total += $this->nextId() + $a51; + if ($hasB42) { + $total += $b42; + } + $total += $this->nextId() + $a52; + $total += $this->nextId() + $a53; + $total += $this->nextId() + $a54; + $total += $this->nextId() + $a55; + if ($hasB43) { + $total += $b43; + } + $total += $this->nextId() + $a56; + $total += $this->nextId() + $a57; + $total += $this->nextId() + $a58; + $total += $this->nextId() + $a59; + if ($hasB44) { + $total += $b44; + } + $total += $this->nextId() + $a0; + $total += $this->nextId() + $a1; + $total += $this->nextId() + $a2; + $total += $this->nextId() + $a3; + if ($hasB45) { + $total += $b45; + } + $total += $this->nextId() + $a4; + $total += $this->nextId() + $a5; + $total += $this->nextId() + $a6; + $total += $this->nextId() + $a7; + if ($hasB46) { + $total += $b46; + } + $total += $this->nextId() + $a8; + $total += $this->nextId() + $a9; + $total += $this->nextId() + $a10; + $total += $this->nextId() + $a11; + if ($hasB47) { + $total += $b47; + } + $total += $this->nextId() + $a12; + $total += $this->nextId() + $a13; + $total += $this->nextId() + $a14; + $total += $this->nextId() + $a15; + if ($hasB48) { + $total += $b48; + } + $total += $this->nextId() + $a16; + $total += $this->nextId() + $a17; + $total += $this->nextId() + $a18; + $total += $this->nextId() + $a19; + if ($hasB49) { + $total += $b49; + } + $total += $this->nextId() + $a20; + $total += $this->nextId() + $a21; + $total += $this->nextId() + $a22; + $total += $this->nextId() + $a23; + if ($hasB50) { + $total += $b50; + } + $total += $this->nextId() + $a24; + $total += $this->nextId() + $a25; + $total += $this->nextId() + $a26; + $total += $this->nextId() + $a27; + if ($hasB51) { + $total += $b51; + } + $total += $this->nextId() + $a28; + $total += $this->nextId() + $a29; + $total += $this->nextId() + $a30; + $total += $this->nextId() + $a31; + if ($hasB52) { + $total += $b52; + } + $total += $this->nextId() + $a32; + $total += $this->nextId() + $a33; + $total += $this->nextId() + $a34; + $total += $this->nextId() + $a35; + if ($hasB53) { + $total += $b53; + } + $total += $this->nextId() + $a36; + $total += $this->nextId() + $a37; + $total += $this->nextId() + $a38; + $total += $this->nextId() + $a39; + if ($hasB54) { + $total += $b54; + } + $total += $this->nextId() + $a40; + $total += $this->nextId() + $a41; + $total += $this->nextId() + $a42; + $total += $this->nextId() + $a43; + if ($hasB55) { + $total += $b55; + } + $total += $this->nextId() + $a44; + $total += $this->nextId() + $a45; + $total += $this->nextId() + $a46; + $total += $this->nextId() + $a47; + if ($hasB56) { + $total += $b56; + } + $total += $this->nextId() + $a48; + $total += $this->nextId() + $a49; + $total += $this->nextId() + $a50; + $total += $this->nextId() + $a51; + if ($hasB57) { + $total += $b57; + } + $total += $this->nextId() + $a52; + $total += $this->nextId() + $a53; + $total += $this->nextId() + $a54; + $total += $this->nextId() + $a55; + if ($hasB58) { + $total += $b58; + } + $total += $this->nextId() + $a56; + $total += $this->nextId() + $a57; + $total += $this->nextId() + $a58; + $total += $this->nextId() + $a59; + if ($hasB59) { + $total += $b59; + } + $total += $this->nextId() + $a0; + $total += $this->nextId() + $a1; + $total += $this->nextId() + $a2; + $total += $this->nextId() + $a3; + if ($hasB0) { + $total += $b0; + } + $total += $this->nextId() + $a4; + $total += $this->nextId() + $a5; + $total += $this->nextId() + $a6; + $total += $this->nextId() + $a7; + if ($hasB1) { + $total += $b1; + } + $total += $this->nextId() + $a8; + $total += $this->nextId() + $a9; + $total += $this->nextId() + $a10; + $total += $this->nextId() + $a11; + if ($hasB2) { + $total += $b2; + } + $total += $this->nextId() + $a12; + $total += $this->nextId() + $a13; + $total += $this->nextId() + $a14; + $total += $this->nextId() + $a15; + if ($hasB3) { + $total += $b3; + } + $total += $this->nextId() + $a16; + $total += $this->nextId() + $a17; + $total += $this->nextId() + $a18; + $total += $this->nextId() + $a19; + if ($hasB4) { + $total += $b4; + } + $total += $this->nextId() + $a20; + $total += $this->nextId() + $a21; + $total += $this->nextId() + $a22; + $total += $this->nextId() + $a23; + if ($hasB5) { + $total += $b5; + } + $total += $this->nextId() + $a24; + $total += $this->nextId() + $a25; + $total += $this->nextId() + $a26; + $total += $this->nextId() + $a27; + if ($hasB6) { + $total += $b6; + } + $total += $this->nextId() + $a28; + $total += $this->nextId() + $a29; + $total += $this->nextId() + $a30; + $total += $this->nextId() + $a31; + if ($hasB7) { + $total += $b7; + } + $total += $this->nextId() + $a32; + $total += $this->nextId() + $a33; + $total += $this->nextId() + $a34; + $total += $this->nextId() + $a35; + if ($hasB8) { + $total += $b8; + } + $total += $this->nextId() + $a36; + $total += $this->nextId() + $a37; + $total += $this->nextId() + $a38; + $total += $this->nextId() + $a39; + if ($hasB9) { + $total += $b9; + } + + return $total; + } + +} From ece33041115813a9a1a7dce1ac44dfbf60475ed0 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Tue, 17 Nov 2026 09:16:57 -0800 Subject: [PATCH 4/4] Accept the numbers of the benchmarks for forgetting narrowed properties From Benchmarks run 44129999329. With `rememberPossiblyImpureFunctionValues` off, the analysis takes 14.36B instructions and 17.44B cycles, against 12.48B and 15.42B with it on: 15 % more instructions and 13 % more cycles, with the same memory. Co-Authored-By: Claude Opus 5.5 (medium effort) Claude-Session: https://claude.ai/code/session_01Tnky3JtcvQrtFGa2fwY9Ay Claude-Code-Session-Id: dfb24569-a61a-4404-8588-60a387d2cccb --- .../bench/data/possibly-impure-calls-forget-properties.php | 6 ++++++ .../data/possibly-impure-calls-remember-properties.php | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/tests/bench/data/possibly-impure-calls-forget-properties.php b/tests/bench/data/possibly-impure-calls-forget-properties.php index d9870a9cd07..076b2bb8307 100644 --- a/tests/bench/data/possibly-impure-calls-forget-properties.php +++ b/tests/bench/data/possibly-impure-calls-forget-properties.php @@ -1,5 +1,11 @@