3v4l.org

run code in 300+ PHP versions simultaneously
<?php const C = [1, 2, 3]; function foo(): array { return C; } foo()[] = 4; var_dump(C);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ARMMS
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CONST                                            'C', <array>
    9     1        INIT_FCALL                                               'foo'
          2        DO_FCALL                                      0  $0      
          3        SEPARATE                                         $0      $0
          4        ASSIGN_DIM                                               $0
          5        OP_DATA                                                  4
   10     6        INIT_FCALL                                               'var_dump'
          7        FETCH_CONSTANT                                   ~2      'C'
          8        SEND_VAL                                                 ~2
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ARMMS
function name:  foo
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   FETCH_CONSTANT                                   ~0      'C'
          1        VERIFY_RETURN_TYPE                                       ~0
          2      > RETURN                                                   ~0
    7     3*       VERIFY_RETURN_TYPE                                       
          4*     > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.39 ms | 1015 KiB | 15 Q