3v4l.org

run code in 300+ PHP versions simultaneously
<?php class huh extends ArrayObject implements Serializable { public function serialize() { return serialize($this->getIterator()); } public function unserialize($data) { $this->exchangeArray($data); } } $value = new huh(); $value[] = $value; echo serialize($value);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bHd7l
function name:  (null)
number of ops:  12
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'huh', 'arrayobject'
    9     1        NEW                                              $1      'huh'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   10     4        QM_ASSIGN                                        ~5      !0
          5        ASSIGN_DIM                                               !0
          6        OP_DATA                                                  ~5
   11     7        INIT_FCALL                                               'serialize'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $6      
         10        ECHO                                                     $6
         11      > RETURN                                                   1

Class huh:
Function serialize:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bHd7l
function name:  serialize
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'serialize'
          1        INIT_METHOD_CALL                                         'getIterator'
          2        DO_FCALL                                      0  $0      
          3        SEND_VAR                                                 $0
          4        DO_ICALL                                         $1      
          5      > RETURN                                                   $1
          6*     > RETURN                                                   null

End of function serialize

Function unserialize:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bHd7l
function name:  unserialize
number of ops:  5
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        INIT_METHOD_CALL                                         'exchangeArray'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4      > RETURN                                                   null

End of function unserialize

End of class huh.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
198.02 ms | 1388 KiB | 15 Q