3v4l.org

run code in 300+ PHP versions simultaneously
<?php class AnnotatedClass { public int $x; private string $s; protected array $arr; public AnotherClass $ac; function bar(string $str, bool $b): float { if ($b && $str === "Hi") { return 3.2; } return 0.3; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bGs0V
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E > > RETURN                                                   1

Class AnnotatedClass:
Function bar:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
filename:       /in/bGs0V
function name:  bar
number of ops:  10
compiled vars:  !0 = $str, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    9     2      > JMPZ_EX                                          ~2      !1, ->5
          3    >   IS_IDENTICAL                                     ~3      !0, 'Hi'
          4        BOOL                                             ~2      ~3
          5    > > JMPZ                                                     ~2, ->7
   10     6    > > RETURN                                                   3.2
   12     7    > > RETURN                                                   0.3
   13     8*       VERIFY_RETURN_TYPE                                       
          9*     > RETURN                                                   null

End of function bar

End of class AnnotatedClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.29 ms | 1393 KiB | 13 Q