3v4l.org

run code in 300+ PHP versions simultaneously
<?php $location = new stdClass; $location->city = "Chicago"; //$variableName = 'location->city'; //${$variableName} = 'Chicago'; $str = array("$$location->city Dentist"); var_dump($str[0]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9Evud
function name:  (null)
number of ops:  16
compiled vars:  !0 = $location, !1 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $2      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    3     3        ASSIGN_OBJ                                               !0, 'city'
          4        OP_DATA                                                  'Chicago'
    7     5        ROPE_INIT                                     3  ~8      '%24'
          6        FETCH_OBJ_R                                      ~6      !0, 'city'
          7        ROPE_ADD                                      1  ~8      ~8, ~6
          8        ROPE_END                                      2  ~7      ~8, '+Dentist'
          9        INIT_ARRAY                                       ~10     ~7
         10        ASSIGN                                                   !1, ~10
    8    11        INIT_FCALL                                               'var_dump'
         12        FETCH_DIM_R                                      ~12     !1, 0
         13        SEND_VAL                                                 ~12
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.38 ms | 1394 KiB | 15 Q