3v4l.org

run code in 300+ PHP versions simultaneously
<?php function betweenScope($num, $min, $max) { //$num = ($num > $max) ? $max : ((!$num < $min) ?: $min); if ($num > $max) { return $num; } else { echo $num . ':' . $min; var_dump(!($num < $min)); if (!$num < $min) { return $num; } else { return $min; } } } //echo betweenScope(21, 0, 5) . PHP_EOL; echo betweenScope(3, 0, 5) . PHP_EOL; //echo betweenScope(-10, 0, 5) . PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OjWkL
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   INIT_FCALL                                               'betweenscope'
          1        SEND_VAL                                                 3
          2        SEND_VAL                                                 0
          3        SEND_VAL                                                 5
          4        DO_FCALL                                      0  $0      
          5        CONCAT                                           ~1      $0, '%0A'
          6        ECHO                                                     ~1
   26     7      > RETURN                                                   1

Function betweenscope:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OjWkL
function name:  betweenScope
number of ops:  22
compiled vars:  !0 = $num, !1 = $min, !2 = $max
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
    7     3        IS_SMALLER                                               !2, !0
          4      > JMPZ                                                     ~3, ->7
    9     5    > > RETURN                                                   !0
          6*       JMP                                                      ->21
   12     7    >   CONCAT                                           ~4      !0, '%3A'
          8        CONCAT                                           ~5      ~4, !1
          9        ECHO                                                     ~5
   13    10        INIT_FCALL                                               'var_dump'
         11        IS_SMALLER                                       ~6      !0, !1
         12        BOOL_NOT                                         ~7      ~6
         13        SEND_VAL                                                 ~7
         14        DO_ICALL                                                 
   14    15        BOOL_NOT                                         ~9      !0
         16        IS_SMALLER                                               ~9, !1
         17      > JMPZ                                                     ~10, ->20
   16    18    > > RETURN                                                   !0
         19*       JMP                                                      ->21
   19    20    > > RETURN                                                   !1
   22    21*     > RETURN                                                   null

End of function betweenscope

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.6 ms | 1399 KiB | 16 Q