Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ```php
- <?php
- <?php
- $a = [];
- $x = @$a['key1']['key2'];
- ```
- ```
- ~/noodlehaus $ php -d vld.active=1 -d vld.execute=0 -f test1.php
- Finding entry points
- Branch analysis from position: 0
- Jump found. Position 1 = -2
- filename: /Users/jesdomingo/noodlehaus/test1.php
- function name: (null)
- number of ops: 11
- compiled vars: !0 = $a, !1 = $x
- line #* E I O op fetch ext return operands
- -------------------------------------------------------------------------------------
- 2 0 E > EXT_STMT
- 1 INIT_ARRAY ~0
- 2 ASSIGN !0, ~0
- 3 3 EXT_STMT
- 4 BEGIN_SILENCE ~2
- 5 FETCH_R local $3 'a'
- 6 FETCH_DIM_R $4 $3, 'key1'
- 7 FETCH_DIM_R $5 $4, 'key2'
- 8 END_SILENCE ~2
- 9 ASSIGN !1, $5
- 4 10 > RETURN 1
- branch: # 0; line: 2- 4; sop: 0; eop: 10; out1: -2
- path #1: 0,
- ```
- ```php
- <?php
- $a = [];
- $x = null;
- if (isset($a['key1']['key2'])) {
- $x = $a['key1']['key2'];
- }
- ```
- ```
- ~/noodlehaus $ php -d vld.active=1 -d vld.execute=0 -f test2.php
- Finding entry points
- Branch analysis from position: 0
- Jump found. Position 1 = 9, Position 2 = 14
- Branch analysis from position: 9
- Jump found. Position 1 = 14
- Branch analysis from position: 14
- Jump found. Position 1 = -2
- Branch analysis from position: 14
- filename: /Users/jesdomingo/noodlehaus/test2.php
- function name: (null)
- number of ops: 15
- compiled vars: !0 = $a, !1 = $x
- line #* E I O op fetch ext return operands
- -------------------------------------------------------------------------------------
- 2 0 E > EXT_STMT
- 1 INIT_ARRAY ~0
- 2 ASSIGN !0, ~0
- 3 3 EXT_STMT
- 4 ASSIGN !1, null
- 4 5 EXT_STMT
- 6 FETCH_DIM_IS $3 !0, 'key1'
- 7 ISSET_ISEMPTY_DIM_OBJ 33554432 ~4 $3, 'key2'
- 8 > JMPZ ~4, ->14
- 5 9 > EXT_STMT
- 10 FETCH_DIM_R $5 !0, 'key1'
- 11 FETCH_DIM_R $6 $5, 'key2'
- 12 ASSIGN !1, $6
- 6 13 > JMP ->14
- 7 14 > > RETURN 1
- branch: # 0; line: 2- 4; sop: 0; eop: 8; out1: 9; out2: 14
- branch: # 9; line: 5- 6; sop: 9; eop: 13; out1: 14
- branch: # 14; line: 7- 7; sop: 14; eop: 14; out1: -2
- path #1: 0, 9, 14,
- path #2: 0, 14,
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement