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 ); var_dump($userString); $obj = unserialize( $userString );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P6CHM
function name:  (null)
number of ops:  15
compiled vars:  !0 = $user, !1 = $userString, !2 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $3      'User'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
   19     3        INIT_FCALL                                               'serialize'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $6      
          6        ASSIGN                                                   !1, $6
   20     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
   22    10        INIT_FCALL                                               'unserialize'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $9      
         13        ASSIGN                                                   !2, $9
         14      > RETURN                                                   1

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

End of function __wakeup

End of class User.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.66 ms | 1395 KiB | 19 Q