3v4l.org

run code in 300+ PHP versions simultaneously
<?php $obj = new stdClass(); $obj->foo = "bar"; $obj->{'foo bar'} = 42; var_dump($obj); $arr = array('foo' => 'bar', 'foo bar' => 42); var_dump((object) $arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kWUh4
function name:  (null)
number of ops:  16
compiled vars:  !0 = $obj, !1 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    4     3        ASSIGN_OBJ                                               !0, 'foo'
          4        OP_DATA                                                  'bar'
    5     5        ASSIGN_OBJ                                               !0, 'foo+bar'
          6        OP_DATA                                                  42
    7     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
    9    10        ASSIGN                                                   !1, <array>
   11    11        INIT_FCALL                                               'var_dump'
         12        CAST                                          8  ~9      !1
         13        SEND_VAL                                                 ~9
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.37 ms | 1394 KiB | 15 Q