3v4l.org

run code in 300+ PHP versions simultaneously
<?php class User { public $username; public $password; public $loginsToday; public function __sleep() { // (Clean up; close database handles, etc) return array_keys( get_object_vars( $this ) ); } public function __wakeup() { echo "Yawn... what’s for breakfast?<br />"; } } $user = new User; $userString = serialize( $user ); $obj = unserialize( $userString );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8HShp
function name:  (null)
number of ops:  12
compiled vars:  !0 = $user, !1 = $userString, !2 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $3      'User'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
   18     3        INIT_FCALL                                               'serialize'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $6      
          6        ASSIGN                                                   !1, $6
   19     7        INIT_FCALL                                               'unserialize'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $8      
         10        ASSIGN                                                   !2, $8
         11      > RETURN                                                   1

Class User:
Function __sleep:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8HShp
function name:  __sleep
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'array_keys'
          1        INIT_FCALL                                               'get_object_vars'
          2        FETCH_THIS                                       ~0      
          3        SEND_VAL                                                 ~0
          4        DO_ICALL                                         $1      
          5        SEND_VAR                                                 $1
          6        DO_ICALL                                         $2      
          7      > RETURN                                                   $2
    9     8*     > RETURN                                                   null

End of function __sleep

Function __wakeup:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8HShp
function name:  __wakeup
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ECHO                                                     'Yawn...+what%E2%80%99s+for+breakfast%3F%3Cbr+%2F%3E'
   13     1      > RETURN                                                   null

End of function __wakeup

End of class User.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.97 ms | 1396 KiB | 21 Q