3v4l.org

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

Class Foo:
Function serialize:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tvMGa
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

End of class Foo.

Class class@anonymous:
Function serialize:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tvMGa
function name:  serialize
number of ops:  1
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E > > RETURN                                                       null

End of function serialize

End of class class@anonymous.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
159.86 ms | 1541 KiB | 10 Q