3v4l.org

run code in 300+ PHP versions simultaneously
<?php class abc { function abc() { return function ($that) { $that->def(); }; } private function def() { } function ghi() { $f = $this->abc(); $f($this); } } $a = new abc; $f = $a->ghi();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JvOXr
function name:  (null)
number of ops:  7
compiled vars:  !0 = $a, !1 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   34     0  E >   NEW                                              $2      'abc'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   35     3        INIT_METHOD_CALL                                         !0, 'ghi'
          4        DO_FCALL                                      0  $5      
          5        ASSIGN                                                   !1, $5
          6      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FJvOXr%3A10%240

Class abc:
Function abc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JvOXr
function name:  abc
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FJvOXr%3A10%240'
   12     1      > RETURN                                                   ~0
   13     2*     > RETURN                                                   null

End of function abc

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

End of function def

Function ghi:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JvOXr
function name:  ghi
number of ops:  8
compiled vars:  !0 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   INIT_METHOD_CALL                                         'abc'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
   26     3        INIT_DYNAMIC_CALL                                        !0
          4        FETCH_THIS                                       $3      
          5        SEND_VAR_EX                                              $3
          6        DO_FCALL                                      0          
   29     7      > RETURN                                                   null

End of function ghi

End of class abc.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.69 ms | 1395 KiB | 13 Q