3v4l.org

run code in 500+ PHP versions simultaneously
<?php $tester = function ($interval) { $max = (int) (PHP_INT_MAX / 1000); $interval = (int) $interval; if ($interval < 0 || $interval >= $max) { echo 'Wrong interval'; } else { echo 'Ok'; } echo PHP_EOL; }; $tester(1); $tester(1000); $tester(PHP_INT_MAX / 1000); $tester((PHP_INT_MAX / 1000) - 2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AADvB
function name:  (null)
number of ops:  15
compiled vars:  !0 = $tester
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                              ~1      [0]
          1        ASSIGN                                                       !0, ~1
   16     2        INIT_DYNAMIC_CALL                                            !0
          3        SEND_VAL_EX                                                  1
          4        DO_FCALL                                          0          
   17     5        INIT_DYNAMIC_CALL                                            !0
          6        SEND_VAL_EX                                                  1000
          7        DO_FCALL                                          0          
   18     8        INIT_DYNAMIC_CALL                                            !0
          9        SEND_VAL_EX                                                  9.22337e+15
         10        DO_FCALL                                          0          
   19    11        INIT_DYNAMIC_CALL                                            !0
         12        SEND_VAL_EX                                                  9.22337e+15
         13        DO_FCALL                                          0          
         14      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/AADvB
function name:  {closure:/in/AADvB:3}
number of ops:  15
compiled vars:  !0 = $interval, !1 = $max
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
    4     1        CAST                                              4  ~2      9.22337e+15
          2        ASSIGN                                                       !1, ~2
    5     3        CAST                                              4  ~4      !0
          4        ASSIGN                                                       !0, ~4
    7     5        IS_SMALLER                                           ~6      !0, 0
          6      > JMPNZ_EX                                             ~6      ~6, ->9
          7    >   IS_SMALLER_OR_EQUAL                                  ~7      !1, !0
          8        BOOL                                                 ~6      ~7
          9    > > JMPZ                                                         ~6, ->12
    8    10    >   ECHO                                                         'Wrong+interval'
    7    11      > JMP                                                          ->13
   10    12    >   ECHO                                                         'Ok'
   13    13    >   ECHO                                                         '%0A'
   14    14      > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
158.21 ms | 2215 KiB | 12 Q