3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Foo { function myMethod(string $name): bool { return []; } } $foo = new Foo(); // $foo->myMethod([]); // Fatal error // $foo->myMethod("name"); // Fatal error
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gB9nf
function name:  (null)
number of ops:  4
compiled vars:  !0 = $foo
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   NEW                                                  $1      'Foo'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
    9     3      > RETURN                                                       1

Class Foo:
Function mymethod:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gB9nf
function name:  myMethod
number of ops:  5
compiled vars:  !0 = $name
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   RECV                                                 !0      
          1        VERIFY_RETURN_TYPE                                   ~1      <array>
          2      > RETURN                                                       ~1
          3*       VERIFY_RETURN_TYPE                                           
          4*     > RETURN                                                       null

End of function mymethod

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
157.38 ms | 2116 KiB | 13 Q