3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function someFunction(int $someVariable): bool { if ($someVariable > 10) { return true; } else if ($someVariable < -10) { return false; } return null; } echo someFunction("11"); echo someFunction("-11"); echo someFunction("0");
based on KPY5L
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/tUOkp
function name:  (null)
number of ops:  14
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   NOP                                                      
  12     1        INIT_FCALL                                               'somefunction'
         2        SEND_VAL                                                 '11'
         3        DO_FCALL                                      0  $0      
         4        ECHO                                                     $0
  13     5        INIT_FCALL                                               'somefunction'
         6        SEND_VAL                                                 '-11'
         7        DO_FCALL                                      0  $1      
         8        ECHO                                                     $1
  14     9        INIT_FCALL                                               'somefunction'
        10        SEND_VAL                                                 '0'
        11        DO_FCALL                                      0  $2      
        12        ECHO                                                     $2
        13      > RETURN                                                   1

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

End of function somefunction

Generated using Vulcan Logic Dumper, using php 7.3.0