3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public $event; public function __call($name, $args) { var_dump($name); var_dump($args); } public function test() { $this->event && $this->event(1); $this->event[] = 'callback'; $this->event && $this->event(2); } } $a = new A(); $a->test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/35MTa
function name:  (null)
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $1      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   24     3        INIT_METHOD_CALL                                         !0, 'test'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class A:
Function __call:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/35MTa
function name:  __call
number of ops:  9
compiled vars:  !0 = $name, !1 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    9     2        INIT_FCALL                                               'var_dump'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                                 
   10     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                                 
   11     8      > RETURN                                                   null

End of function __call

Function test:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 2, Position 2 = 6
Branch analysis from position: 2
2 jumps found. (Code = 46) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
Branch analysis from position: 6
filename:       /in/35MTa
function name:  test
number of ops:  16
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   FETCH_OBJ_R                                      ~0      'event'
          1      > JMPZ_EX                                          ~0      ~0, ->6
          2    >   INIT_METHOD_CALL                                         'event'
          3        SEND_VAL_EX                                              1
          4        DO_FCALL                                      0  $1      
          5        BOOL                                             ~0      $1
   17     6    >   FETCH_OBJ_W                                      $2      'event'
          7        ASSIGN_DIM                                               $2
          8        OP_DATA                                                  'callback'
   18     9        FETCH_OBJ_R                                      ~4      'event'
         10      > JMPZ_EX                                          ~4      ~4, ->15
         11    >   INIT_METHOD_CALL                                         'event'
         12        SEND_VAL_EX                                              2
         13        DO_FCALL                                      0  $5      
         14        BOOL                                             ~4      $5
   19    15    > > RETURN                                                   null

End of function test

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.23 ms | 1396 KiB | 15 Q