comparison vendor/nikic/php-parser/test/code/parser/exprStmtMode.test @ 13:5fb285c0d0e3

Update Drupal core to 8.4.7 via Composer. Security update; I *think* we've been lucky to get away with this so far, as we don't support self-registration which seems to be used by the so-called "drupalgeddon 2" attack that 8.4.5 was vulnerable to.
author Chris Cannam
date Mon, 23 Apr 2018 09:33:26 +0100
parents
children
comparison
equal deleted inserted replaced
12:7a779792577d 13:5fb285c0d0e3
1 Expression statement mode
2 -----
3 <?php
4 $a = $b;
5 yield $x;
6 -----
7 !!exprStmts
8 array(
9 0: Stmt_Expression(
10 expr: Expr_Assign(
11 var: Expr_Variable(
12 name: a
13 )
14 expr: Expr_Variable(
15 name: b
16 )
17 )
18 )
19 1: Stmt_Expression(
20 expr: Expr_Yield(
21 key: null
22 value: Expr_Variable(
23 name: x
24 )
25 )
26 )
27 )
28 -----
29 <?php
30 $a = $b
31 $c = $d
32 -----
33 !!exprStmts
34 Syntax error, unexpected T_VARIABLE from 3:1 to 3:2
35 Syntax error, unexpected EOF from 3:8 to 3:8
36 array(
37 0: Stmt_Expression(
38 expr: Expr_Assign(
39 var: Expr_Variable(
40 name: a
41 )
42 expr: Expr_Variable(
43 name: b
44 )
45 )
46 )
47 1: Stmt_Expression(
48 expr: Expr_Assign(
49 var: Expr_Variable(
50 name: c
51 )
52 expr: Expr_Variable(
53 name: d
54 )
55 )
56 )
57 )