3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Source: https://bugs.php.net/bug.php?id=63369 class bar1 { function __sleep() { foo(); } } class foo1 { function __sleep() { var_dump(serialize(array("test", "1", 234))); var_dump(serialize(new bar1)); } } $o = new foo1; var_dump(unserialize('O:8:"stdclass":0:{}')); //to clear BG(serialize_lock) var_dump(serialize($o));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/scVOS
function name:  (null)
number of ops:  16
compiled vars:  !0 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $1      'foo1'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   19     3        INIT_FCALL                                               'var_dump'
          4        INIT_FCALL                                               'unserialize'
          5        SEND_VAL                                                 'O%3A8%3A%22stdclass%22%3A0%3A%7B%7D'
          6        DO_ICALL                                         $4      
          7        SEND_VAR                                                 $4
          8        DO_ICALL                                                 
   20     9        INIT_FCALL                                               'var_dump'
         10        INIT_FCALL                                               'serialize'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $6      
         13        SEND_VAR                                                 $6
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

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

End of function __sleep

End of class bar1.

Class foo1:
Function __sleep:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/scVOS
function name:  __sleep
number of ops:  15
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'serialize'
          2        SEND_VAL                                                 <array>
          3        DO_ICALL                                         $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
   13     6        INIT_FCALL                                               'var_dump'
          7        INIT_FCALL                                               'serialize'
          8        NEW                                              $2      'bar1'
          9        DO_FCALL                                      0          
         10        SEND_VAR                                                 $2
         11        DO_ICALL                                         $4      
         12        SEND_VAR                                                 $4
         13        DO_ICALL                                                 
   14    14      > RETURN                                                   null

End of function __sleep

End of class foo1.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.82 ms | 1388 KiB | 19 Q