3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Weird { public static function test() { var_dump(isset($this) || get_class($this)); } } 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/7bQee
function name:  (null)
number of ops:  8
compiled vars:  !0 = $w
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_STATIC_METHOD_CALL                                  'Weird', 'test'
          1        DO_FCALL                                      0          
   10     2        NEW                                              $2      'Weird'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $2
   11     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 = 47) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/7bQee
function name:  test
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'var_dump'
          1        ISSET_ISEMPTY_THIS                               ~0      
          2      > JMPNZ_EX                                         ~0      ~0, ->6
          3    >   FETCH_THIS                                       ~1      
          4        GET_CLASS                                        ~2      ~1
          5        BOOL                                             ~0      ~2
          6    >   SEND_VAL                                                 ~0
          7        DO_ICALL                                                 
    6     8      > RETURN                                                   null

End of function test

End of class Weird.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.58 ms | 1395 KiB | 15 Q