3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C { protected $foo; private $bar; public function getBar() { return $this->bar; } } $obj = unserialize("O:1:\"C\":2:{s:6:\"\0*\0foo\";i:42;s:6:\"\0*\0bar\";s:5:\"hello\";}"); var_dump($obj); var_dump($obj->getBar());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7kSAW
function name:  (null)
number of ops:  13
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'unserialize'
          1        SEND_VAL                                                 'O%3A1%3A%22C%22%3A2%3A%7Bs%3A6%3A%22%00%2A%00foo%22%3Bi%3A42%3Bs%3A6%3A%22%00%2A%00bar%22%3Bs%3A5%3A%22hello%22%3B%7D'
          2        DO_ICALL                                         $1      
          3        ASSIGN                                                   !0, $1
   10     4        INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
   12     7        INIT_FCALL                                               'var_dump'
          8        INIT_METHOD_CALL                                         !0, 'getBar'
          9        DO_FCALL                                      0  $4      
         10        SEND_VAR                                                 $4
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

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

End of function getbar

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.6 ms | 1386 KiB | 17 Q