3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo implements Serializable { public function serialize() { } public function unserialize($serialized) { } } var_dump(unserialize(sprintf('C:%d:"%s":0:{}', strlen('Foo'), 'Foo')));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hcRc0
function name:  (null)
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'foo'
    9     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'unserialize'
          3        INIT_FCALL                                               'sprintf'
          4        SEND_VAL                                                 'C%3A%25d%3A%22%25s%22%3A0%3A%7B%7D'
          5        SEND_VAL                                                 3
          6        SEND_VAL                                                 'Foo'
          7        DO_ICALL                                         $0      
          8        SEND_VAR                                                 $0
          9        DO_ICALL                                         $1      
         10        SEND_VAR                                                 $1
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Class Foo:
Function serialize:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hcRc0
function name:  serialize
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E > > 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/hcRc0
function name:  unserialize
number of ops:  2
compiled vars:  !0 = $serialized
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function unserialize

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.36 ms | 1395 KiB | 19 Q