3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { protected $attr = null; protected $attr2 = 1; public function getAttr2() { return $this->attr2; } } $test = new Test(); $test2 = base64_encode(serialize($test)); var_dump(unserialize(base64_decode('Tzo0OiJUZXN0IjoxOntzOjc6IgAqAGF0dHIiO047fQ==')));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/J08P1
function name:  (null)
number of ops:  20
compiled vars:  !0 = $test, !1 = $test2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $2      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   17     3        INIT_FCALL                                               'base64_encode'
          4        INIT_FCALL                                               'serialize'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $5      
          7        SEND_VAR                                                 $5
          8        DO_ICALL                                         $6      
          9        ASSIGN                                                   !1, $6
   19    10        INIT_FCALL                                               'var_dump'
         11        INIT_FCALL                                               'unserialize'
         12        INIT_FCALL                                               'base64_decode'
         13        SEND_VAL                                                 'Tzo0OiJUZXN0IjoxOntzOjc6IgAqAGF0dHIiO047fQ%3D%3D'
         14        DO_ICALL                                         $8      
         15        SEND_VAR                                                 $8
         16        DO_ICALL                                         $9      
         17        SEND_VAR                                                 $9
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

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

End of function getattr2

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.63 ms | 1399 KiB | 23 Q