3v4l.org

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

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

End of function method

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

End of function __tostring

End of class T.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.42 ms | 1387 KiB | 15 Q