3v4l.org

run code in 500+ PHP versions simultaneously
<?php class FOO { public function __toString(): string { return "hello world"; } } function bar(string $x): void { echo $x; } $foo = new FOO(); bar($foo);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3AqcW
function name:  (null)
number of ops:  8
compiled vars:  !0 = $foo
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                                'foo'
   13     1        NEW                                                  $1      'FOO'
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !0, $1
   14     4        INIT_FCALL                                                   'bar'
          5        SEND_VAR                                                     !0
          6        DO_FCALL                                          0          
          7      > RETURN                                                       1

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

End of function bar

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

End of function __tostring

End of class FOO.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
155.64 ms | 1448 KiB | 14 Q