3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { const ALPHA = 1, BETA = 2, GAMMA = 3; public $a = "apple", $b = "bread", $c = "candy"; public function __construct() { // do something } } $t = new Test; echo $t::ALPHA, $t->c, $t->$a;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EXA9G
function name:  (null)
number of ops:  11
compiled vars:  !0 = $t, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $2      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   14     3        FETCH_CLASS                                   0  $5      !0
          4        FETCH_CLASS_CONSTANT                             ~6      $5, 'ALPHA'
          5        ECHO                                                     ~6
          6        FETCH_OBJ_R                                      ~7      !0, 'c'
          7        ECHO                                                     ~7
          8        FETCH_OBJ_R                                      ~8      !0, !1
          9        ECHO                                                     ~8
         10      > RETURN                                                   1

Class Test:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EXA9G
function name:  __construct
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E > > RETURN                                                   null

End of function __construct

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.76 ms | 1384 KiB | 13 Q