3v4l.org

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

Function %00%7Bclosure%7D%2Fin%2ForW3F%3A9%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/orW3F
function name:  {closure}
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   FETCH_THIS                                       $0      
          1        INIT_METHOD_CALL                                         $0, 'a'
          2        DO_FCALL                                      0          
   11     3      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2ForW3F%3A9%240

Class Test:
Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/orW3F
function name:  a
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ECHO                                                     'f'
          1      > RETURN                                                   null

End of function a

Function __call:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/orW3F
function name:  __call
number of ops:  5
compiled vars:  !0 = $f, !1 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        CONCAT                                           ~2      'un-', !0
          3        ECHO                                                     ~2
          4      > RETURN                                                   null

End of function __call

Function b:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/orW3F
function name:  b
number of ops:  3
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2ForW3F%3A9%240'
          1        ASSIGN                                                   !0, ~1
   12     2      > RETURN                                                   null

End of function b

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.9 ms | 1399 KiB | 13 Q