3v4l.org

run code in 300+ PHP versions simultaneously
<?php class BBQ { const SODA = 'soda pop'; } class POP { protected $food; public function __construct(){ $this->food = new BBQ; echo $this->food::SODA; } } new POP;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/e9WAM
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $0      'POP'
          1        DO_FCALL                                      0          
          2        FREE                                                     $0
          3      > RETURN                                                   1

Class BBQ: [no user functions]
Class POP:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/e9WAM
function name:  __construct
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $1      'BBQ'
          1        DO_FCALL                                      0          
          2        ASSIGN_OBJ                                               'food'
          3        OP_DATA                                                  $1
   14     4        FETCH_OBJ_R                                      ~3      'food'
          5        FETCH_CLASS                                   0  $4      ~3
          6        FETCH_CLASS_CONSTANT                             ~5      $4, 'SODA'
          7        ECHO                                                     ~5
   15     8      > RETURN                                                   null

End of function __construct

End of class POP.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.57 ms | 1384 KiB | 13 Q