3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function __construct() { define('self::TEST', 'Hello'); } } define('Foo::TEST', 'Hello'); echo Foo::TEST;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/O5OGU
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'Foo%3A%3ATEST'
          2        SEND_VAL                                                 'Hello'
          3        DO_ICALL                                                 
   12     4        FETCH_CLASS_CONSTANT                             ~1      'Foo', 'TEST'
          5        ECHO                                                     ~1
          6      > RETURN                                                   1

Class Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/O5OGU
function name:  __construct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'self%3A%3ATEST'
          2        SEND_VAL                                                 'Hello'
          3        DO_ICALL                                                 
    7     4      > RETURN                                                   null

End of function __construct

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.39 ms | 1386 KiB | 15 Q