Advertisement
Guest User

Untitled

a guest
Feb 1st, 2015
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.27 KB | None | 0 0
  1. ```php
  2. <?php
  3. <?php
  4. $a = [];
  5. $x = @$a['key1']['key2'];
  6. ```
  7.  
  8. ```
  9. ~/noodlehaus $ php -d vld.active=1 -d vld.execute=0 -f test1.php
  10. Finding entry points
  11. Branch analysis from position: 0
  12. Jump found. Position 1 = -2
  13. filename: /Users/jesdomingo/noodlehaus/test1.php
  14. function name: (null)
  15. number of ops: 11
  16. compiled vars: !0 = $a, !1 = $x
  17. line #* E I O op fetch ext return operands
  18. -------------------------------------------------------------------------------------
  19. 2 0 E > EXT_STMT
  20. 1 INIT_ARRAY ~0
  21. 2 ASSIGN !0, ~0
  22. 3 3 EXT_STMT
  23. 4 BEGIN_SILENCE ~2
  24. 5 FETCH_R local $3 'a'
  25. 6 FETCH_DIM_R $4 $3, 'key1'
  26. 7 FETCH_DIM_R $5 $4, 'key2'
  27. 8 END_SILENCE ~2
  28. 9 ASSIGN !1, $5
  29. 4 10 > RETURN 1
  30.  
  31. branch: # 0; line: 2- 4; sop: 0; eop: 10; out1: -2
  32. path #1: 0,
  33. ```
  34. ```php
  35. <?php
  36. $a = [];
  37. $x = null;
  38. if (isset($a['key1']['key2'])) {
  39. $x = $a['key1']['key2'];
  40. }
  41. ```
  42. ```
  43. ~/noodlehaus $ php -d vld.active=1 -d vld.execute=0 -f test2.php
  44. Finding entry points
  45. Branch analysis from position: 0
  46. Jump found. Position 1 = 9, Position 2 = 14
  47. Branch analysis from position: 9
  48. Jump found. Position 1 = 14
  49. Branch analysis from position: 14
  50. Jump found. Position 1 = -2
  51. Branch analysis from position: 14
  52. filename: /Users/jesdomingo/noodlehaus/test2.php
  53. function name: (null)
  54. number of ops: 15
  55. compiled vars: !0 = $a, !1 = $x
  56. line #* E I O op fetch ext return operands
  57. -------------------------------------------------------------------------------------
  58. 2 0 E > EXT_STMT
  59. 1 INIT_ARRAY ~0
  60. 2 ASSIGN !0, ~0
  61. 3 3 EXT_STMT
  62. 4 ASSIGN !1, null
  63. 4 5 EXT_STMT
  64. 6 FETCH_DIM_IS $3 !0, 'key1'
  65. 7 ISSET_ISEMPTY_DIM_OBJ 33554432 ~4 $3, 'key2'
  66. 8 > JMPZ ~4, ->14
  67. 5 9 > EXT_STMT
  68. 10 FETCH_DIM_R $5 !0, 'key1'
  69. 11 FETCH_DIM_R $6 $5, 'key2'
  70. 12 ASSIGN !1, $6
  71. 6 13 > JMP ->14
  72. 7 14 > > RETURN 1
  73.  
  74. branch: # 0; line: 2- 4; sop: 0; eop: 8; out1: 9; out2: 14
  75. branch: # 9; line: 5- 6; sop: 9; eop: 13; out1: 14
  76. branch: # 14; line: 7- 7; sop: 14; eop: 14; out1: -2
  77. path #1: 0, 9, 14,
  78. path #2: 0, 14,
  79. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement