3v4l.org

run code in 300+ PHP versions simultaneously
<?php // https://bugs.php.net/bug.php?id=71927 define('great','my'); $great=[1 => 'fantastic']; $my='my value'; echo "This is ${great[1] }\n"; echo "This is ${ great[1]}\n"; echo "This is ${ great[1] }\n"; echo "This is ${great[1]}\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YPXkr
function name:  (null)
number of ops:  31
compiled vars:  !0 = $great, !1 = $my
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'great'
          2        SEND_VAL                                                 'my'
          3        DO_ICALL                                                 
    5     4        ASSIGN                                                   !0, <array>
    6     5        ASSIGN                                                   !1, 'my+value'
    8     6        ROPE_INIT                                     3  ~7      'This+is+'
          7        FETCH_DIM_R                                      ~5      !0, 1
          8        ROPE_ADD                                      1  ~7      ~7, ~5
          9        ROPE_END                                      2  ~6      ~7, '%0A'
         10        ECHO                                                     ~6
    9    11        ROPE_INIT                                     3  ~13     'This+is+'
         12        FETCH_CONSTANT                                   ~9      'great'
         13        FETCH_DIM_R                                      ~10     ~9, 1
         14        FETCH_R                      local               ~11     ~10
         15        ROPE_ADD                                      1  ~13     ~13, ~11
         16        ROPE_END                                      2  ~12     ~13, '%0A'
         17        ECHO                                                     ~12
   10    18        ROPE_INIT                                     3  ~19     'This+is+'
         19        FETCH_CONSTANT                                   ~15     'great'
         20        FETCH_DIM_R                                      ~16     ~15, 1
         21        FETCH_R                      local               ~17     ~16
         22        ROPE_ADD                                      1  ~19     ~19, ~17
         23        ROPE_END                                      2  ~18     ~19, '%0A'
         24        ECHO                                                     ~18
   11    25        ROPE_INIT                                     3  ~23     'This+is+'
         26        FETCH_DIM_R                                      ~21     !0, 1
         27        ROPE_ADD                                      1  ~23     ~23, ~21
         28        ROPE_END                                      2  ~22     ~23, '%0A'
         29        ECHO                                                     ~22
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.73 ms | 1400 KiB | 15 Q