3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Caller { private $x = array('a', 'b', 'c'); public function __call($method, $args) { print "Method $method called:\n"; var_dump($args); return $this->x; } } $foo = new Caller(); $a = $foo->test(1, 2, 3); var_dump($a); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LiGf6
function name:  (null)
number of ops:  13
compiled vars:  !0 = $foo, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $2      'Caller'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   13     3        INIT_METHOD_CALL                                         !0, 'test'
          4        SEND_VAL_EX                                              1
          5        SEND_VAL_EX                                              2
          6        SEND_VAL_EX                                              3
          7        DO_FCALL                                      0  $5      
          8        ASSIGN                                                   !1, $5
   14     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                                 
   15    12      > RETURN                                                   1

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

End of function __call

End of class Caller.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.43 ms | 1395 KiB | 15 Q