3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass { const CONSTANT = 'constant value'; function showConstant() { echo $this->CONSTANT . "\n"; } } $myClass = MyClass(); echo $myClass->CONSTANT."\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZQPVS
function name:  (null)
number of ops:  7
compiled vars:  !0 = $myClass
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL_BY_NAME                                       'MyClass'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
   13     3        FETCH_OBJ_R                                      ~3      !0, 'CONSTANT'
          4        CONCAT                                           ~4      ~3, '%0A'
          5        ECHO                                                     ~4
          6      > RETURN                                                   1

Class MyClass:
Function showconstant:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZQPVS
function name:  showConstant
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   FETCH_OBJ_R                                      ~0      'CONSTANT'
          1        CONCAT                                           ~1      ~0, '%0A'
          2        ECHO                                                     ~1
    9     3      > RETURN                                                   null

End of function showconstant

End of class MyClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.71 ms | 1393 KiB | 13 Q