3v4l.org

run code in 500+ PHP versions simultaneously
<?php interface IBagr {} class Bagr implements IBagr { public $n = 1; public static function GetNew() { return new Bagr(); } } define ('XXX', Bagr::GetNew()->n); // Fatal error echo XXX;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iPe7d
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   DECLARE_CLASS                                                'bagr'
   12     1        INIT_FCALL                                                   'define'
          2        SEND_VAL                                                     'XXX'
          3        INIT_STATIC_METHOD_CALL                                      'Bagr', 'GetNew'
          4        DO_FCALL                                          0  $0      
          5        FETCH_OBJ_R                                          ~1      $0, 'n'
          6        SEND_VAL                                                     ~1
          7        DO_ICALL                                                     
   14     8        FETCH_CONSTANT                                       ~3      'XXX'
          9        ECHO                                                         ~3
         10      > RETURN                                                       1

Class IBagr: [no user functions]
Class Bagr:
Function getnew:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iPe7d
function name:  GetNew
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   NEW                                                  $0      'Bagr'
          1        DO_FCALL                                          0          
          2      > RETURN                                                       $0
          3*     > RETURN                                                       null

End of function getnew

End of class Bagr.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
125.59 ms | 477 KiB | 8 Q