3v4l.org

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

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

End of function __tostring

End of class number.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
162.4 ms | 2640 KiB | 14 Q