3v4l.org

run code in 300+ PHP versions simultaneously
<?php $inputs = ['7', '54', '3', 'foo']; foreach ($inputs as $input) { echo "---\n$input >>> "; $sanitized = min(max((int)$input, 5), 50); var_dump($sanitized); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 21
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 21
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/tNfX3
function name:  (null)
number of ops:  23
compiled vars:  !0 = $inputs, !1 = $input, !2 = $sanitized
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1      > FE_RESET_R                                       $4      !0, ->21
          2    > > FE_FETCH_R                                               $4, !1, ->21
    5     3    >   ROPE_INIT                                     3  ~6      '---%0A'
          4        ROPE_ADD                                      1  ~6      ~6, !1
          5        ROPE_END                                      2  ~5      ~6, '+%3E%3E%3E+'
          6        ECHO                                                     ~5
    6     7        INIT_FCALL                                               'min'
          8        INIT_FCALL                                               'max'
          9        CAST                                          4  ~8      !1
         10        SEND_VAL                                                 ~8
         11        SEND_VAL                                                 5
         12        DO_ICALL                                         $9      
         13        SEND_VAR                                                 $9
         14        SEND_VAL                                                 50
         15        DO_ICALL                                         $10     
         16        ASSIGN                                                   !2, $10
    7    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !2
         19        DO_ICALL                                                 
    4    20      > JMP                                                      ->2
         21    >   FE_FREE                                                  $4
    8    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
185.26 ms | 1395 KiB | 19 Q