3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { protected $a = 10; protected $c;} class b { protected $b; public function setA($a){$this->b = $a;return $this;}} var_dump(unserialize(serialize((new b)->setA(new a)), [true]));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/G1dIO
function name:  (null)
number of ops:  18
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'unserialize'
          2        INIT_FCALL                                               'serialize'
          3        NEW                                              $0      'b'
          4        DO_FCALL                                      0          
          5        INIT_METHOD_CALL                                         $0, 'setA'
          6        NEW                                              $2      'a'
          7        DO_FCALL                                      0          
          8        SEND_VAR_NO_REF_EX                                       $2
          9        DO_FCALL                                      0  $4      
         10        SEND_VAR                                                 $4
         11        DO_ICALL                                         $5      
         12        SEND_VAR                                                 $5
         13        SEND_VAL                                                 <array>
         14        DO_ICALL                                         $6      
         15        SEND_VAR                                                 $6
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Class a: [no user functions]
Class b:
Function seta:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/G1dIO
function name:  setA
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        ASSIGN_OBJ                                               'b'
          2        OP_DATA                                                  !0
          3        FETCH_THIS                                       ~2      
          4      > RETURN                                                   ~2
          5*     > RETURN                                                   null

End of function seta

End of class b.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.54 ms | 940 KiB | 20 Q