3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ToS { function __toString(){return 'hi';} } $x=unserialize('O:12:"DateInterval":1:{s:1:"y";O:3:"ToS":0:{}}'); var_dump($x);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OUlEg
function name:  (null)
number of ops:  9
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'tos'
    6     1        INIT_FCALL                                               'unserialize'
          2        SEND_VAL                                                 'O%3A12%3A%22DateInterval%22%3A1%3A%7Bs%3A1%3A%22y%22%3BO%3A3%3A%22ToS%22%3A0%3A%7B%7D%7D'
          3        DO_ICALL                                         $1      
          4        ASSIGN                                                   !0, $1
    7     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Class ToS:
Function __tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OUlEg
function name:  __toString
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E > > RETURN                                                   'hi'
          1*       VERIFY_RETURN_TYPE                                       
          2*     > RETURN                                                   null

End of function __tostring

End of class ToS.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.64 ms | 1394 KiB | 17 Q