3v4l.org

run code in 300+ PHP versions simultaneously
<?php function someFunction(int $someVariable): bool { if ($someVariable > 10) { return true; } else if ($someVariable < -10) { return false; } return null; } $variable = -100; var_dump(someFunction($variable ?? 11));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WoaMo
function name:  (null)
number of ops:  10
compiled vars:  !0 = $variable
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ASSIGN                                                   !0, -100
   14     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'somefunction'
          3        COALESCE                                         ~2      !0
          4        QM_ASSIGN                                        ~2      11
          5        SEND_VAL                                                 ~2
          6        DO_FCALL                                      0  $3      
          7        SEND_VAR                                                 $3
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function somefunction:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WoaMo
function name:  someFunction
number of ops:  12
compiled vars:  !0 = $someVariable
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        IS_SMALLER                                               10, !0
          2      > JMPZ                                                     ~1, ->5
    5     3    > > RETURN                                                   <true>
          4*       JMP                                                      ->8
    6     5    >   IS_SMALLER                                               !0, -10
          6      > JMPZ                                                     ~2, ->8
    7     7    > > RETURN                                                   <false>
    9     8    >   VERIFY_RETURN_TYPE                               ~3      null
          9      > RETURN                                                   ~3
   10    10*       VERIFY_RETURN_TYPE                                       
         11*     > RETURN                                                   null

End of function somefunction

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.09 ms | 1398 KiB | 16 Q