3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = '123'; $testje = json_decode($test, true); if (empty($testje) or ! is_array($testje)) { echo 'leeg'; } else { echo 'niet leeg'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 8, Position 2 = 11
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/YZvl0
function name:  (null)
number of ops:  16
compiled vars:  !0 = $test, !1 = $testje
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '123'
    5     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 <true>
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
    8     6        ISSET_ISEMPTY_CV                                 ~5      !1
          7      > JMPNZ_EX                                         ~5      ~5, ->11
          8    >   TYPE_CHECK                                  128  ~6      !1
          9        BOOL_NOT                                         ~7      ~6
         10        BOOL                                             ~5      ~7
         11    > > JMPZ                                                     ~5, ->14
   10    12    >   ECHO                                                     'leeg'
         13      > JMP                                                      ->15
   14    14    >   ECHO                                                     'niet+leeg'
   15    15    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.94 ms | 1395 KiB | 15 Q