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