3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ERROR); class MyClass { function __toString() { debug_print_backtrace(); die("[!] __toString triggered!"); } } var_dump(unserialize('O:8:"DateTime":1:{s:4:"date";O:7:"MyClass":0:{}}'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JNSmm
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 1
          2        DO_ICALL                                                 
    5     3        DECLARE_CLASS                                            'myclass'
   14     4        INIT_FCALL                                               'var_dump'
          5        INIT_FCALL                                               'unserialize'
          6        SEND_VAL                                                 'O%3A8%3A%22DateTime%22%3A1%3A%7Bs%3A4%3A%22date%22%3BO%3A7%3A%22MyClass%22%3A0%3A%7B%7D%7D'
          7        DO_ICALL                                         $1      
          8        SEND_VAR                                                 $1
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Class MyClass:
Function __tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/JNSmm
function name:  __toString
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'debug_print_backtrace'
          1        DO_ICALL                                                 
   10     2      > EXIT                                                     '%5B%21%5D+__toString+triggered%21'
   11     3*       VERIFY_RETURN_TYPE                                       
          4*     > RETURN                                                   null

End of function __tostring

End of class MyClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.72 ms | 1000 KiB | 17 Q