3v4l.org

run code in 300+ PHP versions simultaneously
<?php function my_unserialize($data) { $array = unserialize($data); if(!is_array($array)) { $array = array(); } return $array; } class ryat { function __destruct() { phpinfo(); } } $a = new ryat(); $str = 'O:4:"ryat":0:{}'; my_unserialize($str);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Avchp
function name:  (null)
number of ops:  8
compiled vars:  !0 = $a, !1 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   NEW                                              $2      'ryat'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   23     3        ASSIGN                                                   !1, 'O%3A4%3A%22ryat%22%3A0%3A%7B%7D'
   25     4        INIT_FCALL                                               'my_unserialize'
          5        SEND_VAR                                                 !1
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Function my_unserialize:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/Avchp
function name:  my_unserialize
number of ops:  11
compiled vars:  !0 = $data, !1 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'unserialize'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $2      
          4        ASSIGN                                                   !1, $2
    7     5        TYPE_CHECK                                  128  ~4      !1
          6        BOOL_NOT                                         ~5      ~4
          7      > JMPZ                                                     ~5, ->9
    9     8    >   ASSIGN                                                   !1, <array>
   12     9    > > RETURN                                                   !1
   13    10*     > RETURN                                                   null

End of function my_unserialize

Class ryat:
Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Avchp
function name:  __destruct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_FCALL                                               'phpinfo'
          1        DO_ICALL                                                 
   18     2      > RETURN                                                   null

End of function __destruct

End of class ryat.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.62 ms | 1402 KiB | 19 Q