3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = ["subject" => "1"]; $json = json_encode($array); $decoded = json_decode($json); $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 = 13, Position 2 = 16
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 18
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
Branch analysis from position: 16
filename:       /in/6F1R9
function name:  (null)
number of ops:  20
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        DO_ICALL                                         $7      
          8        ASSIGN                                                   !2, $7
    7     9        ASSIGN                                                   !3, 0
    8    10        ISSET_ISEMPTY_PROP_OBJ                           ~10     !2, 'subject'
         11        BOOL_NOT                                         ~11     ~10
         12      > JMPNZ_EX                                         ~11     ~11, ->16
         13    >   FETCH_OBJ_R                                      ~12     !2, 'subject'
         14        IS_IDENTICAL                                     ~13     ~12, ''
         15        BOOL                                             ~11     ~13
         16    > > JMPZ                                                     ~11, ->18
    9    17    >   ASSIGN                                                   !3, 5
   13    18    >   ECHO                                                     !3
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.42 ms | 1395 KiB | 17 Q