3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function __toString() { return '42'; } public static function fromInt(int $value) { } } var_dump(Foo::fromInt(new Foo));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ROpEJ
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'foo'
   15     1        INIT_FCALL                                               'var_dump'
          2        INIT_STATIC_METHOD_CALL                                  'Foo', 'fromInt'
          3        NEW                                              $0      'Foo'
          4        DO_FCALL                                      0          
          5        SEND_VAR_NO_REF_EX                                       $0
          6        DO_FCALL                                      0  $2      
          7        SEND_VAR                                                 $2
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Class Foo:
Function __tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ROpEJ
function name:  __toString
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E > > RETURN                                                   '42'
    8     1*       VERIFY_RETURN_TYPE                                       
          2*     > RETURN                                                   null

End of function __tostring

Function fromint:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ROpEJ
function name:  fromInt
number of ops:  2
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   12     1      > RETURN                                                   null

End of function fromint

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.27 ms | 1395 KiB | 15 Q