3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var = '42'; echo "the answer is $var\n";//you don't need the {}, it's just a scalar type $ar = ['answer' => 42]; //it's an array, no you do need the {} echo "the answer is {$ar['answer']}\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pSlZL
function name:  (null)
number of ops:  12
compiled vars:  !0 = $var, !1 = $ar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '42'
    5     1        ROPE_INIT                                     3  ~4      'the+answer+is+'
          2        ROPE_ADD                                      1  ~4      ~4, !0
          3        ROPE_END                                      2  ~3      ~4, '%0A'
          4        ECHO                                                     ~3
    7     5        ASSIGN                                                   !1, <array>
   10     6        ROPE_INIT                                     3  ~9      'the+answer+is+'
          7        FETCH_DIM_R                                      ~7      !1, 'answer'
          8        ROPE_ADD                                      1  ~9      ~9, ~7
          9        ROPE_END                                      2  ~8      ~9, '%0A'
         10        ECHO                                                     ~8
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.77 ms | 1392 KiB | 13 Q