3v4l.org

run code in 500+ PHP versions simultaneously
<?php class A { private $x = 1; public function get(){ return $this->x; } } class B { protected $y = 1; public function get(){ return $this->y; } } $a = unserialize('O:1:"A":1:{s:1:"x";s:5:"hello";}'); $b = unserialize('O:1:"B":1:{s:1:"y";s:5:"world";}'); var_dump($a->get()); var_dump($b->get());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/M0tkM
function name:  (null)
number of ops:  19
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                                   'unserialize'
          1        SEND_VAL                                                     'O%3A1%3A%22A%22%3A1%3A%7Bs%3A1%3A%22x%22%3Bs%3A5%3A%22hello%22%3B%7D'
          2        DO_ICALL                                             $2      
          3        ASSIGN                                                       !0, $2
    5     4        INIT_FCALL                                                   'unserialize'
          5        SEND_VAL                                                     'O%3A1%3A%22B%22%3A1%3A%7Bs%3A1%3A%22y%22%3Bs%3A5%3A%22world%22%3B%7D'
          6        DO_ICALL                                             $4      
          7        ASSIGN                                                       !1, $4
    6     8        INIT_FCALL                                                   'var_dump'
          9        INIT_METHOD_CALL                                             !0, 'get'
         10        DO_FCALL                                          0  $6      
         11        SEND_VAR                                                     $6
         12        DO_ICALL                                                     
    7    13        INIT_FCALL                                                   'var_dump'
         14        INIT_METHOD_CALL                                             !1, 'get'
         15        DO_FCALL                                          0  $8      
         16        SEND_VAR                                                     $8
         17        DO_ICALL                                                     
         18      > RETURN                                                       1

Class A:
Function get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/M0tkM
function name:  get
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   FETCH_OBJ_R                                          ~0      'x'
          1      > RETURN                                                       ~0
          2*     > RETURN                                                       null

End of function get

End of class A.

Class B:
Function get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/M0tkM
function name:  get
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   FETCH_OBJ_R                                          ~0      'y'
          1      > RETURN                                                       ~0
          2*     > RETURN                                                       null

End of function get

End of class B.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
163.77 ms | 488 KiB | 11 Q