3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $a = ['a','b','c']; } $test = new A; $a = (array) $test; foreach($a as $k=>$v){ echo var_dump($v); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 13
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 13
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/H0tMJ
function name:  (null)
number of ops:  15
compiled vars:  !0 = $test, !1 = $a, !2 = $v, !3 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $4      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
    9     3        CAST                                          7  ~7      !0
          4        ASSIGN                                                   !1, ~7
   12     5      > FE_RESET_R                                       $9      !1, ->13
          6    > > FE_FETCH_R                                       ~10     $9, !2, ->13
          7    >   ASSIGN                                                   !3, ~10
   13     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !2
         10        DO_ICALL                                         $12     
         11        ECHO                                                     $12
   12    12      > JMP                                                      ->6
         13    >   FE_FREE                                                  $9
   14    14      > RETURN                                                   1

Class A: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.41 ms | 1394 KiB | 15 Q