3v4l.org

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

Function betweenscope:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PgDfK
function name:  betweenScope
number of ops:  15
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      
    5     3        BOOL_NOT                                         ~3      !0
          4        IS_SMALLER                                       ~4      !2, ~3
          5        JMP_SET                                          ~5      ~4, ->7
          6        QM_ASSIGN                                        ~5      !2
          7        ASSIGN                                                   !0, ~5
    6     8        BOOL_NOT                                         ~7      !0
          9        IS_SMALLER                                       ~8      ~7, !1
         10        JMP_SET                                          ~9      ~8, ->12
         11        QM_ASSIGN                                        ~9      !1
         12        ASSIGN                                                   !0, ~9
    7    13      > RETURN                                                   !0
    8    14*     > RETURN                                                   null

End of function betweenscope

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.51 ms | 1398 KiB | 14 Q