3v4l.org

run code in 300+ PHP versions simultaneously
<?php class SomeClass { public const SOME_VALUE = 'value'; public function __construct() { echo 'side effect '; } } function sideEffect(): SomeClass { return new SomeClass(); } echo sideEffect()::SOME_VALUE;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UkiYR
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_FCALL                                               'sideeffect'
          1        DO_FCALL                                      0  $0      
          2        FETCH_CLASS                                   0  $1      $0
          3        FETCH_CLASS_CONSTANT                             ~2      $1, 'SOME_VALUE'
          4        ECHO                                                     ~2
   18     5      > RETURN                                                   1

Function sideeffect:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UkiYR
function name:  sideEffect
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $0      'SomeClass'
          1        DO_FCALL                                      0          
          2        VERIFY_RETURN_TYPE                                       $0
          3      > RETURN                                                   $0
   15     4*       VERIFY_RETURN_TYPE                                       
          5*     > RETURN                                                   null

End of function sideeffect

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

End of function __construct

End of class SomeClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.6 ms | 1013 KiB | 14 Q