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;}} echo unserialie(serialize((new b)->setA(new a)));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZpG86
function name:  (null)
number of ops:  15
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL_BY_NAME                                       'unserialie'
          1        INIT_FCALL                                               'serialize'
          2        NEW                                              $0      'b'
          3        DO_FCALL                                      0          
          4        INIT_METHOD_CALL                                         $0, 'setA'
          5        NEW                                              $2      'a'
          6        DO_FCALL                                      0          
          7        SEND_VAR_NO_REF_EX                                       $2
          8        DO_FCALL                                      0  $4      
          9        SEND_VAR                                                 $4
         10        DO_ICALL                                         $5      
         11        SEND_VAR_NO_REF_EX                                       $5
         12        DO_FCALL                                      0  $6      
         13        ECHO                                                     $6
         14      > 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/ZpG86
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:
151.57 ms | 1395 KiB | 15 Q