3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public static $_desc = "Test\n"; public function __description() { if (isset($this)) { echo "dynamic\n"; //static::__description(); } else { echo "static\n"; //return static::$_desc; } } } $test = new Test(); echo $test->__description(); echo Test::__description();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5L1bm
function name:  (null)
number of ops:  10
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   20     3        INIT_METHOD_CALL                                         !0, '__description'
          4        DO_FCALL                                      0  $4      
          5        ECHO                                                     $4
   21     6        INIT_STATIC_METHOD_CALL                                  'Test', '__description'
          7        DO_FCALL                                      0  $5      
          8        ECHO                                                     $5
          9      > RETURN                                                   1

Class Test:
Function __description:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 4
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5L1bm
function name:  __description
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ISSET_ISEMPTY_THIS                               ~0      
          1      > JMPZ                                                     ~0, ->4
    9     2    >   ECHO                                                     'dynamic%0A'
          3      > JMP                                                      ->5
   12     4    >   ECHO                                                     'static%0A'
   15     5    > > RETURN                                                   null

End of function __description

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.83 ms | 1393 KiB | 13 Q