3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $bar = 'barValue'; protected $baz = array('bazValue'=>"sdfsdf","test"=>"sdfdsf"); private $tab = 'tabValue'; function __construct(){ return $this->baz; } } $data = (array) new Foo(); var_dump($data["bar"]); var_dump($data["\0*\0baz"]); var_dump($data["\0Foo\0tab"]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Gd9cJ
function name:  (null)
number of ops:  17
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        CAST                                          7  ~3      $1
          3        ASSIGN                                                   !0, ~3
   15     4        INIT_FCALL                                               'var_dump'
          5        FETCH_DIM_R                                      ~5      !0, 'bar'
          6        SEND_VAL                                                 ~5
          7        DO_ICALL                                                 
   16     8        INIT_FCALL                                               'var_dump'
          9        FETCH_DIM_R                                      ~7      !0, '%00%2A%00baz'
         10        SEND_VAL                                                 ~7
         11        DO_ICALL                                                 
   17    12        INIT_FCALL                                               'var_dump'
         13        FETCH_DIM_R                                      ~9      !0, '%00Foo%00tab'
         14        SEND_VAL                                                 ~9
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Class Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Gd9cJ
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   FETCH_OBJ_R                                      ~0      'baz'
          1      > RETURN                                                   ~0
   10     2*     > RETURN                                                   null

End of function __construct

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.4 ms | 1395 KiB | 15 Q