3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string = '{ "46ffacdf-8009-4e7f-9076-1f7f59b152ee": { "variations": { "0": { "_value": { "value": "24,73" }, "_sku": { "value": "79" } } }, "selected": { }, "values": { "0": { } }, "default_variant": "0" }, "48a14646-9b57-44eb-98bc-9c34139bfcd6": { "0": { "file": "images\/237.jpg", "title": "", "link": "", "target": "0", "rel": "" } }, "fff28767-8e69-4c58-ac8b-9ce290c38548": { "0": { "value": "" } }, "8056b532-4837-4514-9d20-6399215a93d9": { "value": "1" } }'; $string = json_decode($string, true, 512, JSON_THROW_ON_ERROR); foreach ($string as $item){ if (isset($item['variations'][0]['_value']['value'])) $value = $item['variations'][0]['_value']['value']; if (isset($item[0]['file'])) $file = $item[0]['file']; } echo $value; echo "\n"; echo $file;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 27
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 27
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 20
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 26
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 26
Branch analysis from position: 20
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
filename:       /in/tbcaD
function name:  (null)
number of ops:  32
compiled vars:  !0 = $string, !1 = $item, !2 = $value, !3 = $file
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%7B+%2246ffacdf-8009-4e7f-9076-1f7f59b152ee%22%3A+%7B+%22variations%22%3A+%7B+%220%22%3A+%7B+%22_value%22%3A+%7B+%22value%22%3A+%2224%2C73%22+%7D%2C+%22_sku%22%3A+%7B+%22value%22%3A+%2279%22+%7D+%7D+%7D%2C+%22selected%22%3A+%7B+%7D%2C+%22values%22%3A+%7B+%220%22%3A+%7B+%7D+%7D%2C+%22default_variant%22%3A+%220%22+%7D%2C+%2248a14646-9b57-44eb-98bc-9c34139bfcd6%22%3A+%7B+%220%22%3A+%7B+%22file%22%3A+%22images%5C%2F237.jpg%22%2C+%22title%22%3A+%22%22%2C+%22link%22%3A+%22%22%2C+%22target%22%3A+%220%22%2C+%22rel%22%3A+%22%22+%7D+%7D%2C+%22fff28767-8e69-4c58-ac8b-9ce290c38548%22%3A+%7B+%220%22%3A+%7B+%22value%22%3A+%22%22+%7D+%7D%2C+%228056b532-4837-4514-9d20-6399215a93d9%22%3A+%7B+%22value%22%3A+%221%22+%7D+%7D'
    5     1        INIT_FCALL                                                   'json_decode'
          2        SEND_VAR                                                     !0
          3        SEND_VAL                                                     <true>
          4        SEND_VAL                                                     512
          5        SEND_VAL                                                     4194304
          6        DO_ICALL                                             $5      
          7        ASSIGN                                                       !0, $5
    8     8      > FE_RESET_R                                           $7      !0, ->27
          9    > > FE_FETCH_R                                                   $7, !1, ->27
   10    10    >   FETCH_DIM_IS                                         ~8      !1, 'variations'
         11        FETCH_DIM_IS                                         ~9      ~8, 0
         12        FETCH_DIM_IS                                         ~10     ~9, '_value'
         13        ISSET_ISEMPTY_DIM_OBJ                             0          ~10, 'value'
         14      > JMPZ                                                         ~11, ->20
         15    >   FETCH_DIM_R                                          ~12     !1, 'variations'
         16        FETCH_DIM_R                                          ~13     ~12, 0
         17        FETCH_DIM_R                                          ~14     ~13, '_value'
         18        FETCH_DIM_R                                          ~15     ~14, 'value'
         19        ASSIGN                                                       !2, ~15
   11    20    >   FETCH_DIM_IS                                         ~17     !1, 0
         21        ISSET_ISEMPTY_DIM_OBJ                             0          ~17, 'file'
         22      > JMPZ                                                         ~18, ->26
         23    >   FETCH_DIM_R                                          ~19     !1, 0
         24        FETCH_DIM_R                                          ~20     ~19, 'file'
         25        ASSIGN                                                       !3, ~20
    8    26    > > JMP                                                          ->9
         27    >   FE_FREE                                                      $7
   14    28        ECHO                                                         !2
   15    29        ECHO                                                         '%0A'
   16    30        ECHO                                                         !3
   17    31      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
157.81 ms | 899 KiB | 9 Q