3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "original example:\n"; $t = 35; $jsonobj = '{"ABC":35,"DEF":36,"GEH":34}'; $obj = json_decode($jsonobj); $match =[]; foreach($obj as $key => $value){ if ($t <= $value) { $match[] = $key . " => " . $value; } } if(count($match) > 0){ echo implode("<br>\n", $match); }else{ echo "no matches"; } echo "\n\n\nexample of all is false:\n"; // If all is false example: $t = 40; $jsonobj = '{"ABC":35,"DEF":36,"GEH":34}'; $obj = json_decode($jsonobj); $match =[]; foreach($obj as $key => $value){ if ($t <= $value) { $match[] = $key . " => " . $value; } } if(count($match) > 0){ echo implode("<br>\n", $match); }else{ echo "no matches"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 18
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 18
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 17
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 17
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 28
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
2 jumps found. (Code = 77) Position 1 = 38, Position 2 = 47
Branch analysis from position: 38
2 jumps found. (Code = 78) Position 1 = 39, Position 2 = 47
Branch analysis from position: 39
2 jumps found. (Code = 43) Position 1 = 42, Position 2 = 46
Branch analysis from position: 42
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
Branch analysis from position: 46
Branch analysis from position: 47
2 jumps found. (Code = 43) Position 1 = 51, Position 2 = 57
Branch analysis from position: 51
1 jumps found. (Code = 42) Position 1 = 58
Branch analysis from position: 58
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 57
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 47
Branch analysis from position: 28
2 jumps found. (Code = 77) Position 1 = 38, Position 2 = 47
Branch analysis from position: 38
Branch analysis from position: 47
Branch analysis from position: 18
filename:       /in/NDuD7
function name:  (null)
number of ops:  59
compiled vars:  !0 = $t, !1 = $jsonobj, !2 = $obj, !3 = $match, !4 = $value, !5 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ECHO                                                     'original+example%3A%0A'
    4     1        ASSIGN                                                   !0, 35
    5     2        ASSIGN                                                   !1, '%7B%22ABC%22%3A35%2C%22DEF%22%3A36%2C%22GEH%22%3A34%7D'
    6     3        INIT_FCALL                                               'json_decode'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $8      
          6        ASSIGN                                                   !2, $8
    7     7        ASSIGN                                                   !3, <array>
    8     8      > FE_RESET_R                                       $11     !2, ->18
          9    > > FE_FETCH_R                                       ~12     $11, !4, ->18
         10    >   ASSIGN                                                   !5, ~12
    9    11        IS_SMALLER_OR_EQUAL                                      !0, !4
         12      > JMPZ                                                     ~14, ->17
   10    13    >   CONCAT                                           ~16     !5, '+%3D%3E+'
         14        CONCAT                                           ~17     ~16, !4
         15        ASSIGN_DIM                                               !3
         16        OP_DATA                                                  ~17
    8    17    > > JMP                                                      ->9
         18    >   FE_FREE                                                  $11
   14    19        COUNT                                            ~18     !3
         20        IS_SMALLER                                               0, ~18
         21      > JMPZ                                                     ~19, ->28
   15    22    >   INIT_FCALL                                               'implode'
         23        SEND_VAL                                                 '%3Cbr%3E%0A'
         24        SEND_VAR                                                 !3
         25        DO_ICALL                                         $20     
         26        ECHO                                                     $20
   14    27      > JMP                                                      ->29
   17    28    >   ECHO                                                     'no+matches'
   21    29    >   ECHO                                                     '%0A%0A%0Aexample+of+all+is+false%3A%0A'
   25    30        ASSIGN                                                   !0, 40
   26    31        ASSIGN                                                   !1, '%7B%22ABC%22%3A35%2C%22DEF%22%3A36%2C%22GEH%22%3A34%7D'
   27    32        INIT_FCALL                                               'json_decode'
         33        SEND_VAR                                                 !1
         34        DO_ICALL                                         $23     
         35        ASSIGN                                                   !2, $23
   28    36        ASSIGN                                                   !3, <array>
   29    37      > FE_RESET_R                                       $26     !2, ->47
         38    > > FE_FETCH_R                                       ~27     $26, !4, ->47
         39    >   ASSIGN                                                   !5, ~27
   30    40        IS_SMALLER_OR_EQUAL                                      !0, !4
         41      > JMPZ                                                     ~29, ->46
   31    42    >   CONCAT                                           ~31     !5, '+%3D%3E+'
         43        CONCAT                                           ~32     ~31, !4
         44        ASSIGN_DIM                                               !3
         45        OP_DATA                                                  ~32
   29    46    > > JMP                                                      ->38
         47    >   FE_FREE                                                  $26
   35    48        COUNT                                            ~33     !3
         49        IS_SMALLER                                               0, ~33
         50      > JMPZ                                                     ~34, ->57
   36    51    >   INIT_FCALL                                               'implode'
         52        SEND_VAL                                                 '%3Cbr%3E%0A'
         53        SEND_VAR                                                 !3
         54        DO_ICALL                                         $35     
         55        ECHO                                                     $35
   35    56      > JMP                                                      ->58
   38    57    >   ECHO                                                     'no+matches'
   39    58    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.08 ms | 1006 KiB | 15 Q