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, strlen($k)).'='.$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 = 55
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 55
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 = 54
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 = 48
Branch analysis from position: 35
1 jumps found. (Code = 42) Position 1 = 54
Branch analysis from position: 54
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 48
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 34
Branch analysis from position: 54
Branch analysis from position: 24
Branch analysis from position: 55
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 55
filename:       /in/O3ETM
function name:  (null)
number of ops:  61
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, ->55
         10    > > FE_FETCH_R                                       ~13     $12, !4, ->55
         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, ->54
   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, ->48
   26    35    >   MUL                                              ~23     '+', 1
         36        INIT_FCALL                                               'substr'
         37        SEND_VAR                                                 !5
         38        SEND_VAL                                                 3
         39        STRLEN                                           ~24     !5
         40        SEND_VAL                                                 ~24
         41        DO_ICALL                                         $25     
         42        CONCAT                                           ~26     ~23, $25
         43        CONCAT                                           ~27     ~26, '%3D'
         44        CONCAT                                           ~28     ~27, !4
         45        ASSIGN                                                   !1, ~28
   27    46        PRE_INC                                                  !2
         47      > JMP                                                      ->54
   29    48    >   MUL                                              ~31     '+', 1
         49        CONCAT                                           ~32     ~31, !5
         50        CONCAT                                           ~33     ~32, '%3D'
         51        CONCAT                                           ~34     ~33, !4
         52        ASSIGN                                                   !1, ~34
   30    53        PRE_INC                                                  !3
   23    54    > > JMP                                                      ->10
         55    >   FE_FREE                                                  $12
   34    56        INIT_FCALL                                               'var_dump'
         57        SEND_VAR                                                 !0
         58        DO_ICALL                                                 
   35    59        ECHO                                                     !1
         60      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.18 ms | 1392 KiB | 21 Q