3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Hoge { protected $a = 'maa'; private $b = 2; } class TestHoge extends Hoge { public $a; public $b; public static function __set_state($an_array) { $obj = new Hoge; $obj->a = $an_array['a']; $obj->b = $an_array['b']; return $obj; } } $c = eval(var_export(new TestHoge, true).';'); print_r($c);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uigbJ
function name:  (null)
number of ops:  13
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   INIT_FCALL                                               'var_export'
          1        NEW                                              $1      'TestHoge'
          2        DO_FCALL                                      0          
          3        SEND_VAR                                                 $1
          4        SEND_VAL                                                 <true>
          5        DO_ICALL                                         $3      
          6        CONCAT                                           ~4      $3, '%3B'
          7        INCLUDE_OR_EVAL                                  $5      ~4, EVAL
          8        ASSIGN                                                   !0, $5
   24     9        INIT_FCALL                                               'print_r'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Class Hoge: [no user functions]
Class TestHoge:
Function __set_state:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uigbJ
function name:  __set_state
number of ops:  12
compiled vars:  !0 = $an_array, !1 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   15     1        NEW                                              $2      'Hoge'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $2
   16     4        FETCH_DIM_R                                      ~6      !0, 'a'
          5        ASSIGN_OBJ                                               !1, 'a'
          6        OP_DATA                                                  ~6
   17     7        FETCH_DIM_R                                      ~8      !0, 'b'
          8        ASSIGN_OBJ                                               !1, 'b'
          9        OP_DATA                                                  ~8
   18    10      > RETURN                                                   !1
   19    11*     > RETURN                                                   null

End of function __set_state

End of class TestHoge.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
189.24 ms | 940 KiB | 18 Q