3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Weird { public static function test() { var_dump(is_a(isset($this) ? $this : self, __CLASS__)); } } Weird::test(); $w = new Weird; $w->test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9nrnO
function name:  (null)
number of ops:  8
compiled vars:  !0 = $w
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_STATIC_METHOD_CALL                                  'Weird', 'test'
          1        DO_FCALL                                      0          
   11     2        NEW                                              $2      'Weird'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $2
   12     5        INIT_METHOD_CALL                                         !0, 'test'
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Class Weird:
Function test:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9nrnO
function name:  test
number of ops:  15
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'is_a'
          2        ISSET_ISEMPTY_THIS                               ~0      
          3      > JMPZ                                                     ~0, ->7
          4    >   FETCH_THIS                                       ~1      
          5        QM_ASSIGN                                        ~2      ~1
          6      > JMP                                                      ->9
          7    >   FETCH_CONSTANT                                   ~3      'self'
          8        QM_ASSIGN                                        ~2      ~3
          9    >   SEND_VAL                                                 ~2
         10        SEND_VAL                                                 'Weird'
         11        DO_ICALL                                         $4      
         12        SEND_VAR                                                 $4
         13        DO_ICALL                                                 
    7    14      > RETURN                                                   null

End of function test

End of class Weird.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.15 ms | 1395 KiB | 17 Q