3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $a = 'ahoj'; public function fet(&$a) { } public function get() { } public function __invoke(&$a) { echo $this->a; } } $a = new A; /*$a('ahoj'); $ref = new \ReflectionMethod($a, '__invoke'); $ref->setAccessible(true); $ref->invoke($a, 'ahoj');*/ function f_a($b, &$a = null) { } /* $f = function($b, &$a) {echo 'a';}; $ref = new ReflectionFunction($f); $ref->invoke($f, 3, $a->get());*/ f_a(1); //$ar = array($a, 'fet'); //$a->fet(new DateTime);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4of3g
function name:  (null)
number of ops:  7
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $1      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   32     3        INIT_FCALL                                               'f_a'
          4        SEND_VAL                                                 1
          5        DO_FCALL                                      0          
   35     6      > RETURN                                                   1

Function f_a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4of3g
function name:  f_a
number of ops:  3
compiled vars:  !0 = $b, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      null
   25     2      > RETURN                                                   null

End of function f_a

Class A:
Function fet:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4of3g
function name:  fet
number of ops:  2
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1      > RETURN                                                   null

End of function fet

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

End of function get

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

End of function __invoke

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.59 ms | 1399 KiB | 14 Q