3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $foo = 'foo'; protected $bar = 'two'; private $baz = 'three'; } $b = (array) new Foo(); foreach ($b as $key => $value){ print $key."".$value."<br>"; } var_dump($b["foo"]); var_dump($b["\0*\0bar"]); var_dump($b["\0Foo\0baz"]);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 12
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 12
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/sTsRv
function name:  (null)
number of ops:  26
compiled vars:  !0 = $b, !1 = $value, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $3      'Foo'
          1        DO_FCALL                                      0          
          2        CAST                                          7  ~5      $3
          3        ASSIGN                                                   !0, ~5
   12     4      > FE_RESET_R                                       $7      !0, ->12
          5    > > FE_FETCH_R                                       ~8      $7, !1, ->12
          6    >   ASSIGN                                                   !2, ~8
   13     7        CONCAT                                           ~10     !2, ''
          8        CONCAT                                           ~11     ~10, !1
          9        CONCAT                                           ~12     ~11, '%3Cbr%3E'
         10        ECHO                                                     ~12
   12    11      > JMP                                                      ->5
         12    >   FE_FREE                                                  $7
   18    13        INIT_FCALL                                               'var_dump'
         14        FETCH_DIM_R                                      ~13     !0, 'foo'
         15        SEND_VAL                                                 ~13
         16        DO_ICALL                                                 
   19    17        INIT_FCALL                                               'var_dump'
         18        FETCH_DIM_R                                      ~15     !0, '%00%2A%00bar'
         19        SEND_VAL                                                 ~15
         20        DO_ICALL                                                 
   20    21        INIT_FCALL                                               'var_dump'
         22        FETCH_DIM_R                                      ~17     !0, '%00Foo%00baz'
         23        SEND_VAL                                                 ~17
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.16 ms | 1387 KiB | 15 Q