3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { function __toString() { return "bar";}} $a = fopen(__FILE__, "r"); var_dump($a && $a);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/ulRUN
function name:  (null)
number of ops:  12
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_CLASS                                            'foo'
    3     1        INIT_FCALL                                               'fopen'
          2        SEND_VAL                                                 '%2Fin%2FulRUN'
          3        SEND_VAL                                                 'r'
          4        DO_ICALL                                         $1      
          5        ASSIGN                                                   !0, $1
    4     6        INIT_FCALL                                               'var_dump'
          7      > JMPZ_EX                                          ~3      !0, ->9
          8    >   BOOL                                             ~3      !0
          9    >   SEND_VAL                                                 ~3
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

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

End of function __tostring

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.41 ms | 1386 KiB | 17 Q