3v4l.org

run code in 300+ PHP versions simultaneously
<?php $row = '{ "persona_apellido": "hey", "persona_apellido-maxwidth": 48, "persona_curso": "info", "persona_curso-maxwidth": 32, "persona_email": "dude@dude.com", "persona_email-maxwidth": 128, "persona_freg": "2013-08-15 17:03:58", "persona_freg-maxwidth": 152, "persona_id": "3", "persona_id-maxwidth": 8, "persona_nombre": "dude", "persona_nombre-maxwidth": 64, "up_persona_apellido": "", "up_persona_curso": "", "up_persona_email": "", "up_persona_freg": "", "up_persona_id": "", "up_persona_nombre": ""}'; $row = json_decode($row, true); $queryIn = '';$ladoA = 0;$ladoB = 0; foreach($row as $k => $value){ if(strstr($k,'-maxwidth') === false && strstr($k,'itemSelected') === false){ if(!empty($value) && strstr($k,'up_') !== false){ $queryIn =+ ' '.substr($k, 3).'='.$value; $ladoA++; }else{ $queryIn =+ ' '.$k.'='.$value; $ladoB++; } } } var_dump($row); echo $queryIn;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 53
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 53
Branch analysis from position: 11
2 jumps found. (Code = 46) Position 1 = 18, Position 2 = 24
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 52
Branch analysis from position: 25
2 jumps found. (Code = 46) Position 1 = 28, Position 2 = 34
Branch analysis from position: 28
2 jumps found. (Code = 43) Position 1 = 35, Position 2 = 46
Branch analysis from position: 35
1 jumps found. (Code = 42) Position 1 = 52
Branch analysis from position: 52
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 46
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 34
Branch analysis from position: 52
Branch analysis from position: 24
Branch analysis from position: 53
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 53
filename:       /in/ZqHal
function name:  (null)
number of ops:  59
compiled vars:  !0 = $row, !1 = $queryIn, !2 = $ladoA, !3 = $ladoB, !4 = $value, !5 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%7B%0A++++%09%22persona_apellido%22%3A+%22hey%22%2C%0A++++++++%22persona_apellido-maxwidth%22%3A+48%2C%0A+++++++%09%22persona_curso%22%3A+%22info%22%2C%0A++++++++%22persona_curso-maxwidth%22%3A+32%2C%0A++++++++%22persona_email%22%3A+%22dude%40dude.com%22%2C%0A++++++++%22persona_email-maxwidth%22%3A+128%2C%0A++++++++%22persona_freg%22%3A+%222013-08-15+17%3A03%3A58%22%2C%0A++++++++%22persona_freg-maxwidth%22%3A+152%2C%0A++++++++%22persona_id%22%3A+%223%22%2C%0A++++++++%22persona_id-maxwidth%22%3A+8%2C%0A++++++++%22persona_nombre%22%3A+%22dude%22%2C%0A++++++++%22persona_nombre-maxwidth%22%3A+64%2C%0A++++++++%22up_persona_apellido%22%3A+%22%22%2C%0A++++++++%22up_persona_curso%22%3A+%22%22%2C%0A++++++++%22up_persona_email%22%3A+%22%22%2C%0A++++++++%22up_persona_freg%22%3A+%22%22%2C%0A++++++++%22up_persona_id%22%3A+%22%22%2C%0A++++++++%22up_persona_nombre%22%3A+%22%22%7D'
   21     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 <true>
          4        DO_ICALL                                         $7      
          5        ASSIGN                                                   !0, $7
   22     6        ASSIGN                                                   !1, ''
          7        ASSIGN                                                   !2, 0
          8        ASSIGN                                                   !3, 0
   23     9      > FE_RESET_R                                       $12     !0, ->53
         10    > > FE_FETCH_R                                       ~13     $12, !4, ->53
         11    >   ASSIGN                                                   !5, ~13
   24    12        INIT_FCALL                                               'strstr'
         13        SEND_VAR                                                 !5
         14        SEND_VAL                                                 '-maxwidth'
         15        DO_ICALL                                         $15     
         16        TYPE_CHECK                                    4  ~16     $15
         17      > JMPZ_EX                                          ~16     ~16, ->24
         18    >   INIT_FCALL                                               'strstr'
         19        SEND_VAR                                                 !5
         20        SEND_VAL                                                 'itemSelected'
         21        DO_ICALL                                         $17     
         22        TYPE_CHECK                                    4  ~18     $17
         23        BOOL                                             ~16     ~18
         24    > > JMPZ                                                     ~16, ->52
   25    25    >   ISSET_ISEMPTY_CV                                 ~19     !4
         26        BOOL_NOT                                         ~20     ~19
         27      > JMPZ_EX                                          ~20     ~20, ->34
         28    >   INIT_FCALL                                               'strstr'
         29        SEND_VAR                                                 !5
         30        SEND_VAL                                                 'up_'
         31        DO_ICALL                                         $21     
         32        TYPE_CHECK                                  1018  ~22     $21
         33        BOOL                                             ~20     ~22
         34    > > JMPZ                                                     ~20, ->46
   26    35    >   MUL                                              ~23     '+', 1
         36        INIT_FCALL                                               'substr'
         37        SEND_VAR                                                 !5
         38        SEND_VAL                                                 3
         39        DO_ICALL                                         $24     
         40        CONCAT                                           ~25     ~23, $24
         41        CONCAT                                           ~26     ~25, '%3D'
         42        CONCAT                                           ~27     ~26, !4
         43        ASSIGN                                                   !1, ~27
   27    44        PRE_INC                                                  !2
         45      > JMP                                                      ->52
   29    46    >   MUL                                              ~30     '+', 1
         47        CONCAT                                           ~31     ~30, !5
         48        CONCAT                                           ~32     ~31, '%3D'
         49        CONCAT                                           ~33     ~32, !4
         50        ASSIGN                                                   !1, ~33
   30    51        PRE_INC                                                  !3
   23    52    > > JMP                                                      ->10
         53    >   FE_FREE                                                  $12
   34    54        INIT_FCALL                                               'var_dump'
         55        SEND_VAR                                                 !0
         56        DO_ICALL                                                 
   35    57        ECHO                                                     !1
         58      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.05 ms | 1400 KiB | 21 Q