3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Example { public function run1() { Example::test1(); static::test2(); $this->test3(); } public static function run2() { Example::test4(); static::test5(); $a = new static; $a->test6(); } public static function __callStatic($name, array $arguments) { echo __METHOD__.'('.$name.')'."\n"; } public function __call($name, array $arguments) { echo __METHOD__.'('.$name.')'."\n"; } } $e = new Example(); $e->run1(); Example::run2();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DbEsr
function name:  (null)
number of ops:  8
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $1      'Example'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   24     3        INIT_METHOD_CALL                                         !0, 'run1'
          4        DO_FCALL                                      0          
   26     5        INIT_STATIC_METHOD_CALL                                  'Example', 'run2'
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Class Example:
Function run1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DbEsr
function name:  run1
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_STATIC_METHOD_CALL                                  'Example', 'test1'
          1        DO_FCALL                                      0          
    6     2        INIT_STATIC_METHOD_CALL                                  'test2'
          3        DO_FCALL                                      0          
    7     4        INIT_METHOD_CALL                                         'test3'
          5        DO_FCALL                                      0          
    8     6      > RETURN                                                   null

End of function run1

Function run2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DbEsr
function name:  run2
number of ops:  10
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_STATIC_METHOD_CALL                                  'Example', 'test4'
          1        DO_FCALL                                      0          
   11     2        INIT_STATIC_METHOD_CALL                                  'test5'
          3        DO_FCALL                                      0          
   12     4        NEW                          static              $3      
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $3
   13     7        INIT_METHOD_CALL                                         !0, 'test6'
          8        DO_FCALL                                      0          
   14     9      > RETURN                                                   null

End of function run2

Function __callstatic:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DbEsr
function name:  __callStatic
number of ops:  7
compiled vars:  !0 = $name, !1 = $arguments
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   16     2        CONCAT                                           ~2      'Example%3A%3A__callStatic%28', !0
          3        CONCAT                                           ~3      ~2, '%29'
          4        CONCAT                                           ~4      ~3, '%0A'
          5        ECHO                                                     ~4
   17     6      > 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/DbEsr
function name:  __call
number of ops:  7
compiled vars:  !0 = $name, !1 = $arguments
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   19     2        CONCAT                                           ~2      'Example%3A%3A__call%28', !0
          3        CONCAT                                           ~3      ~2, '%29'
          4        CONCAT                                           ~4      ~3, '%0A'
          5        ECHO                                                     ~4
   20     6      > RETURN                                                   null

End of function __call

End of class Example.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.41 ms | 1399 KiB | 13 Q