Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. SameasTest.php

function SameasTest::compile

Overrides TestExpression::compile

File

vendor/twig/twig/src/Node/Expression/Test/SameasTest.php, line 24

Class

SameasTest
Checks if a variable is the same as another one (=== in PHP).

Namespace

Twig\Node\Expression\Test

Code

public function compile(Compiler $compiler) : void {
    $compiler->raw('(')
        ->subcompile($this->getNode('node'))
        ->raw(' === ')
        ->subcompile($this->getNode('arguments')
        ->getNode('0'))
        ->raw(')');
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal