3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { function __call($name, $args){ echo "__call " . $name . PHP_EOL; } public static function __callStatic($name, $args) { echo "__callStatic " . $name . PHP_EOL; } function make_call() { $this->bob(); } public function make_call_static() { self::ted(); } } $x = new foo(); $x->jim(); $x->make_call(); $x->make_call_static(); foo::sam();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/efccS
function name:  (null)
number of ops:  12
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   NEW                                              $1      'foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   22     3        INIT_METHOD_CALL                                         !0, 'jim'
          4        DO_FCALL                                      0          
   23     5        INIT_METHOD_CALL                                         !0, 'make_call'
          6        DO_FCALL                                      0          
   24     7        INIT_METHOD_CALL                                         !0, 'make_call_static'
          8        DO_FCALL                                      0          
   25     9        INIT_STATIC_METHOD_CALL                                  'foo', 'sam'
         10        DO_FCALL                                      0          
         11      > RETURN                                                   1

Class foo:
Function __call:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/efccS
function name:  __call
number of ops:  6
compiled vars:  !0 = $name, !1 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        CONCAT                                           ~2      '__call+', !0
          3        CONCAT                                           ~3      ~2, '%0A'
          4        ECHO                                                     ~3
    6     5      > 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/efccS
function name:  __callStatic
number of ops:  6
compiled vars:  !0 = $name, !1 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    9     2        CONCAT                                           ~2      '__callStatic+', !0
          3        CONCAT                                           ~3      ~2, '%0A'
          4        ECHO                                                     ~3
   10     5      > RETURN                                                   null

End of function __callstatic

Function make_call:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/efccS
function name:  make_call
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_METHOD_CALL                                         'bob'
          1        DO_FCALL                                      0          
   14     2      > RETURN                                                   null

End of function make_call

Function make_call_static:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/efccS
function name:  make_call_static
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_STATIC_METHOD_CALL                                  'ted'
          1        DO_FCALL                                      0          
   18     2      > RETURN                                                   null

End of function make_call_static

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.33 ms | 1390 KiB | 13 Q