3v4l.org

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

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

End of function __construct

Function dostuff:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2FrLY
function name:  doStuff
number of ops:  3
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1      > RETURN                                                   !0
    9     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/2FrLY
function name:  doStaticStuff
number of ops:  3
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   11     1      > RETURN                                                   !0
   12     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