3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C { public function __toString() { return 'woo'; } } $c = array('doo', 'foo', 'bloo'); var_dump((string)$c); var_dump((int)$c);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2voYf
function name:  (null)
number of ops:  11
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'c'
    9     1        ASSIGN                                                   !0, <array>
   10     2        INIT_FCALL                                               'var_dump'
          3        CAST                                          6  ~2      !0
          4        SEND_VAL                                                 ~2
          5        DO_ICALL                                                 
   11     6        INIT_FCALL                                               'var_dump'
          7        CAST                                          4  ~4      !0
          8        SEND_VAL                                                 ~4
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

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

End of function __tostring

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.04 ms | 1394 KiB | 15 Q