3v4l.org

run code in 300+ PHP versions simultaneously
<?php function betweenScope($num, $min, $max) { return ($num > $max) ? $max : ((!($num < $min)) ? $num : $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/1qlGO
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     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
   11     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 = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
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
filename:       /in/1qlGO
function name:  betweenScope
number of ops:  16
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      
    6     3        IS_SMALLER                                               !2, !0
          4      > JMPZ                                                     ~3, ->7
          5    >   QM_ASSIGN                                        ~4      !2
          6      > JMP                                                      ->14
          7    >   IS_SMALLER                                       ~5      !0, !1
          8        BOOL_NOT                                         ~6      ~5
          9      > JMPZ                                                     ~6, ->12
         10    >   QM_ASSIGN                                        ~7      !0
         11      > JMP                                                      ->13
         12    >   QM_ASSIGN                                        ~7      !1
         13    >   QM_ASSIGN                                        ~4      ~7
         14    > > RETURN                                                   ~4
    7    15*     > RETURN                                                   null

End of function betweenscope

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.03 ms | 1398 KiB | 14 Q