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() { var_dump($this); $this->a(); }; $c(); } } $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/IGnia
function name:  (null)
number of ops:  8
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   19     3        INIT_METHOD_CALL                                         !0, 'b'
          4        DO_FCALL                                      0          
   20     5        INIT_METHOD_CALL                                         !0, 'c'
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

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

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

Class Test:
Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IGnia
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/IGnia
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/IGnia
function name:  b
number of ops:  5
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FIGnia%3A9%240'
          1        ASSIGN                                                   !0, ~1
   14     2        INIT_DYNAMIC_CALL                                        !0
          3        DO_FCALL                                      0          
   15     4      > RETURN                                                   null

End of function b

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.44 ms | 1400 KiB | 15 Q