3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { function dump() { var_dump(get_class($this)); var_dump(self::class); var_dump(get_class()); var_dump(get_class(null)); } } (new Foo())->dump();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GI5Kc
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $0      'Foo'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $0, 'dump'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Class Foo:
Function dump:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GI5Kc
function name:  dump
number of ops:  17
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_THIS                                       ~0      
          2        GET_CLASS                                        ~1      ~0
          3        SEND_VAL                                                 ~1
          4        DO_ICALL                                                 
    6     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAL                                                 'Foo'
          7        DO_ICALL                                                 
    7     8        INIT_FCALL                                               'var_dump'
          9        GET_CLASS                                        ~4      
         10        SEND_VAL                                                 ~4
         11        DO_ICALL                                                 
    8    12        INIT_FCALL                                               'var_dump'
         13        GET_CLASS                                        ~6      null
         14        SEND_VAL                                                 ~6
         15        DO_ICALL                                                 
    9    16      > RETURN                                                   null

End of function dump

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.23 ms | 992 KiB | 14 Q