3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass { const CONST_VALUE = 'A constant value'; } $classname = 'MyClass'; echo $classname::CONST_VALUE; // As of PHP 5.3.0 echo MyClass::CONST_VALUE; $new = new MyClass(); echo $new::CONST_VALUE; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s2pEo
function name:  (null)
number of ops:  12
compiled vars:  !0 = $classname, !1 = $new
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, 'MyClass'
    7     1        FETCH_CLASS                                   0  $3      !0
          2        FETCH_CLASS_CONSTANT                             ~4      $3, 'CONST_VALUE'
          3        ECHO                                                     ~4
    9     4        ECHO                                                     'A+constant+value'
   11     5        NEW                                              $5      'MyClass'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $5
   12     8        FETCH_CLASS                                   0  $8      !1
          9        FETCH_CLASS_CONSTANT                             ~9      $8, 'CONST_VALUE'
         10        ECHO                                                     ~9
   13    11      > RETURN                                                   1

Class MyClass: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.87 ms | 1397 KiB | 13 Q