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*\0", '', $key); $key = str_replace("\0$cls\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 = 40
Branch analysis from position: 20
2 jumps found. (Code = 78) Position 1 = 21, Position 2 = 40
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 40
filename:       /in/pXTYn
function name:  (null)
number of ops:  45
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, ->40
         20    > > FE_FETCH_R                                       ~21     $20, !5, ->40
         21    >   ASSIGN                                                   !6, ~21
   20    22        INIT_FCALL                                               'str_replace'
         23        SEND_VAL                                                 '%00%2A%00'
         24        SEND_VAL                                                 ''
         25        SEND_VAR                                                 !6
         26        DO_ICALL                                         $23     
         27        ASSIGN                                                   !6, $23
   21    28        INIT_FCALL                                               'str_replace'
         29        ROPE_INIT                                     3  ~26     '%00'
         30        ROPE_ADD                                      1  ~26     ~26, !2
         31        ROPE_END                                      2  ~25     ~26, '%00'
         32        SEND_VAL                                                 ~25
         33        SEND_VAL                                                 ''
         34        SEND_VAR                                                 !6
         35        DO_ICALL                                         $28     
         36        ASSIGN                                                   !6, $28
   22    37        ASSIGN_DIM                                               !4, !6
         38        OP_DATA                                                  !5
   19    39      > JMP                                                      ->20
         40    >   FE_FREE                                                  $20
   24    41        INIT_FCALL                                               'var_dump'
         42        SEND_VAR                                                 !4
         43        DO_ICALL                                                 
         44      > RETURN                                                   1

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.76 ms | 1400 KiB | 17 Q