Server IP : 104.21.38.3 / Your IP : 172.68.164.133 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /www/wwwroot/lapma.in/phpMyAdmin/vendor/symfony/expression-language/ |
Upload File : |
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <[email protected]> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\ExpressionLanguage; /** * Represents a Token. * * @author Fabien Potencier <[email protected]> */ class Token { public $value; public $type; public $cursor; public const EOF_TYPE = 'end of expression'; public const NAME_TYPE = 'name'; public const NUMBER_TYPE = 'number'; public const STRING_TYPE = 'string'; public const OPERATOR_TYPE = 'operator'; public const PUNCTUATION_TYPE = 'punctuation'; /** * @param string $type The type of the token (self::*_TYPE) * @param string|int|float|null $value The token value * @param int $cursor The cursor position in the source */ public function __construct(string $type, $value, ?int $cursor) { $this->type = $type; $this->value = $value; $this->cursor = $cursor; } /** * Returns a string representation of the token. * * @return string */ public function __toString() { return sprintf('%3d %-11s %s', $this->cursor, strtoupper($this->type), $this->value); } /** * Tests the current token for a type and/or a value. * * @return bool */ public function test(string $type, string $value = null) { return $this->type === $type && (null === $value || $this->value == $value); } }