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){ trim($key); print $key."".$value."<br>"; } var_dump($b);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 15
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 15
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/5Uv7T
function name:  (null)
number of ops:  20
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, ->15
          5    > > FE_FETCH_R                                       ~8      $7, !1, ->15
          6    >   ASSIGN                                                   !2, ~8
   14     7        INIT_FCALL                                               'trim'
          8        SEND_VAR                                                 !2
          9        DO_ICALL                                                 
   15    10        CONCAT                                           ~11     !2, ''
         11        CONCAT                                           ~12     ~11, !1
         12        CONCAT                                           ~13     ~12, '%3Cbr%3E'
         13        ECHO                                                     ~13
   12    14      > JMP                                                      ->5
         15    >   FE_FREE                                                  $7
   20    16        INIT_FCALL                                               'var_dump'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.66 ms | 1395 KiB | 17 Q