3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public static function __callStatic($m, $args) { var_dump($m); } public function __call($m, $args) { var_dump($m); } } $callable = [new Foo, '']; $callable(); $callable = 'Foo::'; $callable();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HkRQ7
function name:  (null)
number of ops:  11
compiled vars:  !0 = $callable
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        INIT_ARRAY                                       ~3      $1
          3        ADD_ARRAY_ELEMENT                                ~3      ''
          4        ASSIGN                                                   !0, ~3
   13     5        INIT_DYNAMIC_CALL                                        !0
          6        DO_FCALL                                      0          
   15     7        ASSIGN                                                   !0, 'Foo%3A%3A'
   16     8        INIT_DYNAMIC_CALL                                        !0
          9        DO_FCALL                                      0          
         10      > RETURN                                                   1

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

End of function __callstatic

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

End of function __call

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.96 ms | 1446 KiB | 14 Q