3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { private $a; public function __contruct($test) { $this->a = $test.'1'; } public function foo() { echo '$a is '.$this->$a; } } $x = new Test('test'); $x->foo(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k7hPN
function name:  (null)
number of ops:  7
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'Test'
          1        SEND_VAL_EX                                              'test'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   15     4        INIT_METHOD_CALL                                         !0, 'foo'
          5        DO_FCALL                                      0          
   17     6      > RETURN                                                   1

Class Test:
Function __contruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k7hPN
function name:  __contruct
number of ops:  5
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        CONCAT                                           ~2      !0, '1'
          2        ASSIGN_OBJ                                               'a'
          3        OP_DATA                                                  ~2
    7     4      > RETURN                                                   null

End of function __contruct

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k7hPN
function name:  foo
number of ops:  4
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   FETCH_OBJ_R                                      ~1      !0
          1        CONCAT                                           ~2      '%24a+is+', ~1
          2        ECHO                                                     ~2
   11     3      > RETURN                                                   null

End of function foo

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.71 ms | 1393 KiB | 13 Q