3v4l.org

run code in 300+ PHP versions simultaneously
<?php class TestA { const TEST = 'a'; public static function test() { echo static::TEST; } } class TestB { const TEST = 'b'; } $test = new TestA(); $test2 = new testB(); echo $test; echo $test2;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hRQDL
function name:  (null)
number of ops:  9
compiled vars:  !0 = $test, !1 = $test2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $2      'TestA'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   18     3        NEW                                              $5      'testB'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   19     6        ECHO                                                     !0
   20     7        ECHO                                                     !1
          8      > RETURN                                                   1

Class TestA:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hRQDL
function name:  test
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   FETCH_CLASS_CONSTANT                             ~0      'TEST'
          1        ECHO                                                     ~0
    9     2      > RETURN                                                   null

End of function test

End of class TestA.

Class TestB: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.57 ms | 1393 KiB | 13 Q