3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $p1 = "secret"; public function B() { ${'t' . 'his'} = 'hidden'; // works $GLOBALS['this'] = 'lovely'; echo "{$GLOBALS['this']} $this {$this->p1}"; } } $a = new A; $a->B();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ndS1u
function name:  (null)
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $1      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   11     3        INIT_METHOD_CALL                                         !0, 'B'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class A:
Function b:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ndS1u
function name:  B
number of ops:  16
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   FETCH_W                      local               $0      'this'
          1        ASSIGN                                                   $0, 'hidden'
    6     2        FETCH_W                      global              $2      'GLOBALS'
          3        ASSIGN_DIM                                               $2, 'this'
          4        OP_DATA                                                  'lovely'
    7     5        FETCH_R                      global              ~4      'GLOBALS'
          6        FETCH_DIM_R                                      ~5      ~4, 'this'
          7        ROPE_INIT                                     5  ~9      ~5
          8        ROPE_ADD                                      1  ~9      ~9, '+'
          9        FETCH_THIS                                       ~6      
         10        ROPE_ADD                                      2  ~9      ~9, ~6
         11        ROPE_ADD                                      3  ~9      ~9, '+'
         12        FETCH_OBJ_R                                      ~7      'p1'
         13        ROPE_END                                      4  ~8      ~9, ~7
         14        ECHO                                                     ~8
    8    15      > RETURN                                                   null

End of function b

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.88 ms | 1398 KiB | 13 Q