���Root Mod By V1rus_Alfa
User / IP
:
216.73.216.158
Host / Server
:
195.214.235.115 / npln.ir
System
:
Linux damavand.pws-dns.net 5.14.0-503.35.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 4 05:23:43 EDT 2025 x86_64
Command
|
Upload
|
Mass Deface
|
Create
:
/
home2
/
cutunixc
/
repositories
/
npln
/
vendor
/
psy
/
psysh
/
src
/
Readline
/
Interactive
/
Helper
/
Viewing: TokenHelper.php
<?php /* * This file is part of Psy Shell. * * (c) 2012-2026 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Psy\Readline\Interactive\Helper; /** * Shared token analysis utilities. */ class TokenHelper { /** @var int[] Token types that indicate a statement continues on the next line */ private const TRAILING_TOKEN_OPS = [ \T_OBJECT_OPERATOR, \T_PAAMAYIM_NEKUDOTAYIM, \T_BOOLEAN_AND, \T_BOOLEAN_OR, \T_LOGICAL_AND, \T_LOGICAL_OR, \T_DOUBLE_ARROW, \T_COALESCE, \T_SPACESHIP, ]; /** @var string[] Single-character operators that indicate continuation */ private const TRAILING_CHAR_OPS = ['+', '-', '*', '/', '%', '.', '=', '&', '|', '^', '<', '>', ',']; /** * Check whether the last non-whitespace token is a trailing operator. * * Used to determine whether a statement continues onto the next line. * * @param array $tokens token_get_all tokens */ public static function hasTrailingOperator(array $tokens): bool { if (empty($tokens)) { return false; } $lastToken = null; for ($i = \count($tokens) - 1; $i >= 0; $i--) { $token = $tokens[$i]; if (\is_array($token) && $token[0] === \T_WHITESPACE) { continue; } $lastToken = $token; break; } if ($lastToken === null) { return false; } if (\is_array($lastToken)) { return \in_array($lastToken[0], self::TRAILING_TOKEN_OPS, true); } return \in_array($lastToken, self::TRAILING_CHAR_OPS, true); } }
Coded With 💗 by
0x6ick Mod By V1rus_Alfa