3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function newQuery() { var_dump('native', 'newQuery'); } public function __call($name, $args) { var_dump('__call', $name); } public static function __callStatic($name, $args) { var_dump('__callStatic', $name); } } $foo = new Foo(); $foo::newQuery(); var_dump('----'); Foo::newQuery();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gNYKF
function name:  (null)
number of ops:  12
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   24     3        FETCH_CLASS                                   0  $4      !0
          4        INIT_STATIC_METHOD_CALL                                  $4, 'newQuery'
          5        DO_FCALL                                      0          
   25     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAL                                                 '----'
          8        DO_ICALL                                                 
   26     9        INIT_STATIC_METHOD_CALL                                  'Foo', 'newQuery'
         10        DO_FCALL                                      0          
         11      > RETURN                                                   1

Class Foo:
Function newquery:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gNYKF
function name:  newQuery
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAL                                                 'native'
          2        SEND_VAL                                                 'newQuery'
          3        DO_ICALL                                                 
    9     4      > RETURN                                                   null

End of function newquery

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

End of function __call

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

End of function __callstatic

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.64 ms | 1007 KiB | 14 Q