3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { public $a; protected $b; private $c; public function __construct() { $this->a = 'A_a'; $this->b = 'A_b'; $this->c = 'A_c'; } } class B extends A { public $b; private $c; public function __construct() { parent::__construct(); $this->b = 'B_b'; $this->c = 'B_c'; } } $b = new B; var_dump($b); $array = (array) $b; var_dump($array); echo str_replace("\0", '\0', var_export($b, true)); foreach ($array as $k => $v) { var_dump([bin2hex($k), $k, $v]); }
Finding entry points
Branch analysis from position: 0
Jump found. (Code = 77) Position 1 = 25, Position 2 = 37
Branch analysis from position: 25
Jump found. (Code = 78) Position 1 = 26, Position 2 = 37
Branch analysis from position: 26
Jump found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
Branch analysis from position: 37
Jump found. (Code = 62) Position 1 = -2
Branch analysis from position: 37
filename:       /in/VWdHK
function name:  (null)
number of ops:  39
compiled vars:  !0 = $b, !1 = $array, !2 = $v, !3 = $k
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   NOP                                                      
  17     1        NOP                                                      
         2        NOP                                                      
  31     3        NEW                                              $7      :-3
         4        DO_FCALL                                      0          
         5        ASSIGN                                                   !0, $7
  32     6        INIT_FCALL                                               'var_dump'
         7        SEND_VAR                                                 !0
         8        DO_ICALL                                                 
  34     9        CAST                                          7  ~11     !0
        10        ASSIGN                                                   !1, ~11
  35    11        INIT_FCALL                                               'var_dump'
        12        SEND_VAR                                                 !1
        13        DO_ICALL                                                 
  37    14        INIT_FCALL                                               'str_replace'
        15        SEND_VAL                                                 '%00'
        16        SEND_VAL                                                 '%5C0'
        17        INIT_FCALL                                               'var_export'
        18        SEND_VAR                                                 !0
        19        SEND_VAL                                                 <true>
        20        DO_ICALL                                         $14     
        21        SEND_VAR                                                 $14
        22        DO_ICALL                                         $15     
        23        ECHO                                                     $15
  39    24      > FE_RESET_R                                       $16     !1, ->37
        25    > > FE_FETCH_R                                       ~17     $16, !2, ->37
        26    >   ASSIGN                                                   !3, ~17
  41    27        INIT_FCALL                                               'var_dump'
        28        INIT_FCALL                                               'bin2hex'
        29        SEND_VAR                                                 !3
        30        DO_ICALL                                         $19     
        31        INIT_ARRAY                                       ~20     $19
        32        ADD_ARRAY_ELEMENT                                ~20     !3
        33        ADD_ARRAY_ELEMENT                                ~20     !2
        34        SEND_VAL                                                 ~20
        35        DO_ICALL                                                 
        36      > JMP                                                      ->25
        37    >   FE_FREE                                                  $16
  42    38      > RETURN                                                   1

Class A:
Function __construct:
Finding entry points
Branch analysis from position: 0
Jump found. (Code = 62) Position 1 = -2
filename:       /in/VWdHK
function name:  __construct
number of ops:  7
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  11     0  E >   ASSIGN_OBJ                                               'a'
         1        OP_DATA                                                  'A_a'
  12     2        ASSIGN_OBJ                                               'b'
         3        OP_DATA                                                  'A_b'
  13     4        ASSIGN_OBJ                                               'c'
         5        OP_DATA                                                  'A_c'
  14     6      > RETURN                                                   null

End of function __construct

End of class A.

Class B:
Function __construct:
Finding entry points
Branch analysis from position: 0
Jump found. (Code = 62) Position 1 = -2
filename:       /in/VWdHK
function name:  __construct
number of ops:  7
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  24     0  E >   INIT_STATIC_METHOD_CALL                                  
         1        DO_FCALL                                      0          
  26     2        ASSIGN_OBJ                                               'b'
         3        OP_DATA                                                  'B_b'
  27     4        ASSIGN_OBJ                                               'c'
         5        OP_DATA                                                  'B_c'
  28     6      > RETURN                                                   null

End of function __construct

End of class B.

Generated using Vulcan Logic Dumper, using php 7.3.0