3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { function __sleep() { } function __construct() { throw new Exception(); } } $a = new foo; $x = serialize($a); $y = unserialize($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WUgKl
function name:  (null)
number of ops:  12
compiled vars:  !0 = $a, !1 = $x, !2 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $3      'foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    9     3        INIT_FCALL                                               'serialize'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $6      
          6        ASSIGN                                                   !1, $6
   10     7        INIT_FCALL                                               'unserialize'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $8      
         10        ASSIGN                                                   !2, $8
         11      > RETURN                                                   1

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

End of function __sleep

Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/WUgKl
function name:  __construct
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                                              $0      'Exception'
          1        DO_FCALL                                      0          
          2      > THROW                                         0          $0
          3*     > RETURN                                                   null

End of function __construct

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.86 ms | 1387 KiB | 17 Q