3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.29 ms | 1399 KiB | 15 Q