3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fields = array('name' => array(),'test' => array(),'lol' => array()); foreach($fields as $k => $v){ $max_length = $row[$k]['max_length']; $min_length = $row[$k]['min_length']; if(strlen($v) > $max_length){ echo 'max!!'; exit(); }elseif(strlen($v) < $min_length){ echo 'min!!'; exit(); }else{ echo strlen($v).'<br>'; } if(is_array($v) || ($this->serialize_bool && is_bool($v))){ $v = serialize($v); } $query .= " '".mysql_real_escape_string($v)."'"; $nr++; if($nr != count($fields)){ $query .= ','; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 50
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 50
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 16
Branch analysis from position: 13
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 22
Branch analysis from position: 19
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 22
2 jumps found. (Code = 47) Position 1 = 27, Position 2 = 33
Branch analysis from position: 27
2 jumps found. (Code = 46) Position 1 = 30, Position 2 = 32
Branch analysis from position: 30
2 jumps found. (Code = 43) Position 1 = 34, Position 2 = 38
Branch analysis from position: 34
2 jumps found. (Code = 43) Position 1 = 48, Position 2 = 49
Branch analysis from position: 48
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 49
Branch analysis from position: 38
Branch analysis from position: 32
Branch analysis from position: 33
Branch analysis from position: 50
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 50
filename:       /in/XAkRo
function name:  (null)
number of ops:  52
compiled vars:  !0 = $fields, !1 = $v, !2 = $k, !3 = $max_length, !4 = $row, !5 = $min_length, !6 = $query, !7 = $nr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    4     1      > FE_RESET_R                                       $9      !0, ->50
          2    > > FE_FETCH_R                                       ~10     $9, !1, ->50
          3    >   ASSIGN                                                   !2, ~10
    6     4        FETCH_DIM_R                                      ~12     !4, !2
          5        FETCH_DIM_R                                      ~13     ~12, 'max_length'
          6        ASSIGN                                                   !3, ~13
    7     7        FETCH_DIM_R                                      ~15     !4, !2
          8        FETCH_DIM_R                                      ~16     ~15, 'min_length'
          9        ASSIGN                                                   !5, ~16
    9    10        STRLEN                                           ~18     !1
         11        IS_SMALLER                                               !3, ~18
         12      > JMPZ                                                     ~19, ->16
   10    13    >   ECHO                                                     'max%21%21'
         14      > EXIT                                                     
         15*       JMP                                                      ->25
   11    16    >   STRLEN                                           ~20     !1
         17        IS_SMALLER                                               ~20, !5
         18      > JMPZ                                                     ~21, ->22
   12    19    >   ECHO                                                     'min%21%21'
         20      > EXIT                                                     
         21*       JMP                                                      ->25
   14    22    >   STRLEN                                           ~22     !1
         23        CONCAT                                           ~23     ~22, '%3Cbr%3E'
         24        ECHO                                                     ~23
   18    25        TYPE_CHECK                                  128  ~24     !1
         26      > JMPNZ_EX                                         ~24     ~24, ->33
         27    >   FETCH_THIS                                       $25     
         28        FETCH_OBJ_R                                      ~26     $25, 'serialize_bool'
         29      > JMPZ_EX                                          ~26     ~26, ->32
         30    >   TYPE_CHECK                                   12  ~27     !1
         31        BOOL                                             ~26     ~27
         32    >   BOOL                                             ~24     ~26
         33    > > JMPZ                                                     ~24, ->38
         34    >   INIT_FCALL                                               'serialize'
         35        SEND_VAR                                                 !1
         36        DO_ICALL                                         $28     
         37        ASSIGN                                                   !1, $28
   19    38    >   INIT_FCALL_BY_NAME                                       'mysql_real_escape_string'
         39        SEND_VAR_EX                                              !1
         40        DO_FCALL                                      0  $30     
         41        CONCAT                                           ~31     '+%27', $30
         42        CONCAT                                           ~32     ~31, '%27'
         43        ASSIGN_OP                                     8          !6, ~32
   20    44        PRE_INC                                                  !7
   21    45        COUNT                                            ~35     !0
         46        IS_NOT_EQUAL                                             !7, ~35
         47      > JMPZ                                                     ~36, ->49
         48    >   ASSIGN_OP                                     8          !6, '%2C'
    4    49    > > JMP                                                      ->2
         50    >   FE_FREE                                                  $9
   22    51      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.94 ms | 1400 KiB | 15 Q