3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $a = 5; private function pp() { return $this->a; } public function __invoke() { $a = array($this, 'pp'); return $a(); } } $a = new A(); va_dump($a());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SDk5e
function name:  (null)
number of ops:  9
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   15     3        INIT_FCALL_BY_NAME                                       'va_dump'
          4        INIT_DYNAMIC_CALL                                        !0
          5        DO_FCALL                                      0  $4      
          6        SEND_VAR_NO_REF_EX                                       $4
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

Class A:
Function pp:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SDk5e
function name:  pp
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   FETCH_OBJ_R                                      ~0      'a'
          1      > RETURN                                                   ~0
    7     2*     > RETURN                                                   null

End of function pp

Function __invoke:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SDk5e
function name:  __invoke
number of ops:  8
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   FETCH_THIS                                       ~1      
          1        INIT_ARRAY                                       ~2      ~1
          2        ADD_ARRAY_ELEMENT                                ~2      'pp'
          3        ASSIGN                                                   !0, ~2
   10     4        INIT_DYNAMIC_CALL                                        !0
          5        DO_FCALL                                      0  $4      
          6      > RETURN                                                   $4
   11     7*     > RETURN                                                   null

End of function __invoke

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.05 ms | 1394 KiB | 13 Q