3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $a; public function setA($a) { echo 'SET A: ' . $a; $this->a = $a; } } function run(&$cb) { $cb('AA'); } $obj = new A; run($obj->setA);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4rEI7
function name:  (null)
number of ops:  8
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   17     3        INIT_FCALL                                               'run'
          4        FETCH_OBJ_W                                      $4      !0, 'setA'
          5        SEND_REF                                                 $4
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Function run:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4rEI7
function name:  run
number of ops:  5
compiled vars:  !0 = $cb
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        INIT_DYNAMIC_CALL                                        !0
          2        SEND_VAL_EX                                              'AA'
          3        DO_FCALL                                      0          
   13     4      > RETURN                                                   null

End of function run

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

End of function seta

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
205.43 ms | 1398 KiB | 14 Q