3v4l.org

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

Class Foo:
Function dostuff:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5hYed
function name:  doStuff
number of ops:  3
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1      > RETURN                                                   !0
    5     2*     > RETURN                                                   null

End of function dostuff

Function dostaticstuff:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5hYed
function name:  doStaticStuff
number of ops:  3
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1      > RETURN                                                   !0
    8     2*     > RETURN                                                   null

End of function dostaticstuff

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.29 ms | 1396 KiB | 17 Q