It is not recommend to use PHP's short opening tag <?, better use <?php, or <?= in case of outputting.
Short opening tags are disabled in PHP’s default configuration. In such a case,
all content of this file is output verbatim to the browser without being parsed,
or executed.
As a precaution to avoid these problems better use the long opening tag <?php.
Loading history...
2
3
namespace Funivan\PhpTokenizer\Pattern\Patterns;
4
5
use Funivan\PhpTokenizer\QuerySequence\QuerySequence;
6
7
/**
8
*
9
*/
10
class FunctionCallPattern implements PatternInterface {
11
12
13
/**
14
* @inheritdoc
15
*/
16
public function __invoke(QuerySequence $querySequence) {
17
18
$name = $querySequence->strict(T_STRING);
19
$querySequence->possible(T_WHITESPACE);
20
$arguments = $querySequence->section('(', ')');
21
22
if (!$querySequence->isValid()) {
23
return null;
24
}
25
26
$querySequence->moveToToken($name);
27
$before = $querySequence->move(-1);
28
if ($before->getType() === T_WHITESPACE) {
29
$before = $querySequence->move(-1);
30
}
31
32
if (in_array($before->getValue(), ['::', 'function'])) {
Short opening tags are disabled in PHP’s default configuration. In such a case, all content of this file is output verbatim to the browser without being parsed, or executed.
As a precaution to avoid these problems better use the long opening tag
<?php
.