3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** *class Foo *{ * protected $bar = null; * * public function __construct($bar = null) * { * $this->bar = $bar; * } *} * * The class above represents the serialized, base64_encoded string below. */ $serialized = 'TzozOiJGb28iOjE6e3M6NjoiACoAYmFyIjtzOjM6ImJheiI7fQ=='; class Foo { public $bar = null; public function getBar() { return $this->bar; } } var_dump(addslashes(base64_decode($serialized))); $class = unserialize(base64_decode($serialized)); var_dump($class); var_dump($class->getBar());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/irnRC
function name:  (null)
number of ops:  26
compiled vars:  !0 = $serialized, !1 = $class
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   ASSIGN                                                   !0, 'TzozOiJGb28iOjE6e3M6NjoiACoAYmFyIjtzOjM6ImJheiI7fQ%3D%3D'
   24     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'addslashes'
          3        INIT_FCALL                                               'base64_decode'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $3      
          6        SEND_VAR                                                 $3
          7        DO_ICALL                                         $4      
          8        SEND_VAR                                                 $4
          9        DO_ICALL                                                 
   25    10        INIT_FCALL                                               'unserialize'
         11        INIT_FCALL                                               'base64_decode'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $6      
         14        SEND_VAR                                                 $6
         15        DO_ICALL                                         $7      
         16        ASSIGN                                                   !1, $7
   26    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                                 
   27    20        INIT_FCALL                                               'var_dump'
         21        INIT_METHOD_CALL                                         !1, 'getBar'
         22        DO_FCALL                                      0  $10     
         23        SEND_VAR                                                 $10
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

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

End of function getbar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.19 ms | 1002 KiB | 17 Q