3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* $o = new stdClass; $id = -99; $a = array('id' => $id, 'name' => 'bill'); $o->$id = $a; var_export($o); */ $o = (object) array(-99 => array('id' => $id, 'name' => 'bill')); var_export($o);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vIXc2
function name:  (null)
number of ops:  9
compiled vars:  !0 = $o, !1 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_ARRAY                                       ~2      !1, 'id'
          1        ADD_ARRAY_ELEMENT                                ~2      'bill', 'name'
          2        INIT_ARRAY                                       ~3      ~2, -99
          3        CAST                                          8  ~4      ~3
          4        ASSIGN                                                   !0, ~4
   10     5        INIT_FCALL                                               'var_export'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.35 ms | 1394 KiB | 15 Q