3v4l.org

run code in 300+ PHP versions simultaneously
<?php $response_return = ''; $response = '{"status":"failure","reason":{"base":["Reached campaign cap"]},"testing":false}'; // Provide $data = json_decode($response); if ($data['status'] != 'failure') { $response_return = 'Success'; } else { $response_return = $data['reason']['base']; } echo $response_return;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8AGOh
function name:  (null)
number of ops:  16
compiled vars:  !0 = $response_return, !1 = $response, !2 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, ''
    5     1        ASSIGN                                                   !1, '%7B%22status%22%3A%22failure%22%2C%22reason%22%3A%7B%22base%22%3A%5B%22Reached+campaign+cap%22%5D%7D%2C%22testing%22%3Afalse%7D'
    8     2        INIT_FCALL                                               'json_decode'
          3        SEND_VAR                                                 !1
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !2, $5
    9     6        FETCH_DIM_R                                      ~7      !2, 'status'
          7        IS_NOT_EQUAL                                             ~7, 'failure'
          8      > JMPZ                                                     ~8, ->11
   10     9    >   ASSIGN                                                   !0, 'Success'
         10      > JMP                                                      ->14
   12    11    >   FETCH_DIM_R                                      ~10     !2, 'reason'
         12        FETCH_DIM_R                                      ~11     ~10, 'base'
         13        ASSIGN                                                   !0, ~11
   17    14    >   ECHO                                                     !0
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.28 ms | 1395 KiB | 15 Q