3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = ["subject" => "1"]; $json = json_encode($array); $decoded = json_decode($json, true); $val = 0; if (!isset($decoded->subject) || $decoded->subject === '') { $val = 5; } echo $val;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 14, Position 2 = 17
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 19
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
Branch analysis from position: 17
filename:       /in/DoDtq
function name:  (null)
number of ops:  21
compiled vars:  !0 = $array, !1 = $json, !2 = $decoded, !3 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        INIT_FCALL                                               'json_encode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
    5     5        INIT_FCALL                                               'json_decode'
          6        SEND_VAR                                                 !1
          7        SEND_VAL                                                 <true>
          8        DO_ICALL                                         $7      
          9        ASSIGN                                                   !2, $7
    7    10        ASSIGN                                                   !3, 0
    8    11        ISSET_ISEMPTY_PROP_OBJ                           ~10     !2, 'subject'
         12        BOOL_NOT                                         ~11     ~10
         13      > JMPNZ_EX                                         ~11     ~11, ->17
         14    >   FETCH_OBJ_R                                      ~12     !2, 'subject'
         15        IS_IDENTICAL                                     ~13     ~12, ''
         16        BOOL                                             ~11     ~13
         17    > > JMPZ                                                     ~11, ->19
    9    18    >   ASSIGN                                                   !3, 5
   13    19    >   ECHO                                                     !3
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.01 ms | 1395 KiB | 17 Q