3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo {} class Bar implements Serializable{ public function serialize() { return "foobar"; } public function unserialize($data) { } } $foo = new Foo; $bar = new Bar; var_dump(serialize($foo)); var_dump(serialize($bar));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CXBCB
function name:  (null)
number of ops:  20
compiled vars:  !0 = $foo, !1 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   DECLARE_CLASS                                            'bar'
   15     1        NEW                                              $2      'Foo'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   16     4        NEW                                              $5      'Bar'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $5
   17     7        INIT_FCALL                                               'var_dump'
          8        INIT_FCALL                                               'serialize'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $8      
         11        SEND_VAR                                                 $8
         12        DO_ICALL                                                 
   18    13        INIT_FCALL                                               'var_dump'
         14        INIT_FCALL                                               'serialize'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                         $10     
         17        SEND_VAR                                                 $10
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Class Foo: [no user functions]
Class Bar:
Function serialize:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CXBCB
function name:  serialize
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E > > RETURN                                                   'foobar'
    8     1*     > 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/CXBCB
function name:  unserialize
number of ops:  2
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   12     1      > RETURN                                                   null

End of function unserialize

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.68 ms | 1396 KiB | 17 Q