3v4l.org

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

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.68 ms | 1396 KiB | 17 Q