*/ class DefinedTest extends TestExpression { public function __construct(Node $node, string $name, ?Node $arguments, int $lineno) { if ($node instanceof NameExpression) { $node->setAttribute('is_defined_test', true); } elseif ($node instanceof GetAttrExpression) { $node->setAttribute('is_defined_test', true); $this->changeIgnoreStrictCheck($node); } elseif ($node instanceof BlockReferenceExpression) { $node->setAttribute('is_defined_test', true); } elseif ($node instanceof FunctionExpression && 'constant' === $node->getAttribute('name')) { $node->setAttribute('is_defined_test', true); } elseif ($node instanceof ConstantExpression || $node instanceof ArrayExpression) { $node = new ConstantExpression(true, $node->getTemplateLine()); } elseif ($node instanceof MethodCallExpression) { $node->setAttribute('is_defined_test', true); } else { throw new SyntaxError('The "defined" test only works with simple variables.', $lineno); } parent::__construct($node, $name, $arguments, $lineno); } private function changeIgnoreStrictCheck(GetAttrExpression $node) { $node->setAttribute('optimizable', false); $node->setAttribute('ignore_strict_check', true); if ($node->getNode('node') instanceof GetAttrExpression) { $this->changeIgnoreStrictCheck($node->getNode('node')); } } public function compile(Compiler $compiler) { $compiler->subcompile($this->getNode('node')); } } __halt_compiler();----SIGNATURE:----QEyCbp4/0+FHAALwFzZojpdem6bOHrEsqBevpoNnk7qu4ysuY2QHrRxoHQT6EKlp8U4YKwfB7BFUmRg+yQoOGK8MWM7UajdpKh31s9xPlJ2CdHnSp7vBEM+DCzTmfnilyxg9TcafwUYI/+louM3fWq6XtPok6n69/MKePramNWXMtHFSoI+W16TyULqw6YRKVMs0xGU2c8Gmi94WU0c/AGFJs6tDq2ypuzKEO+WXDmnflkYwhZ/HhFfDuLlEKnWGJKPp5KX5lgtrqsUYb31CdhHQA09jjc7XaZDkNKvTOE3/DfMLJzgaqSEI4Ta5TcYBRCZFrrBiV4K4wx0yT97zMspmk42h9mCgrMWhMd7UjJWy9VNu2q1clIp4QCmnYEDaICsVx/qsTYyoDCtNUNiX76AGSTDsCns+MG/Q+Y9vr7UN19Od5rkEkJTJzm8W9psubz5Xap5ipjODU1YSwqfV2f1f6WRR86aKxTmzRZpg2+jNXACEMDKX6Q4jprJUebomlff6yqzUtdbk9QN/KtorTqJJOxbpFy8MetQyj5jfaeLpRHG0zBZpDSKrWpS7zNgU/Eja5JNCj5QfvaJzcK4lT4PWVT9ws41ybUoRRWSFO3ofI5qvChFDGLj+CbGFCIrBgLQFpcvPwDFw3Z5nslSQQCbAKg4vlRc8X6Qw94h8LuQ=----ATTACHMENT:----MTUwMzcyMzEzOTg2MjAxNSA5OTI0NjU5OTI5OTczMyA3MDE5NjA0Nzc3NjQxNjY2