3v4l.org

run code in 300+ PHP versions simultaneously
<?php $stats_json = '{"id":"http:\/\/spin.loc\/articles\/123123\/","count":12}'; $stats_data = json_decode($stats_json); var_dump($stats_data); var_dump($stats->count); $stats = (!empty($stats->count)) ? $stats->count : 0; var_dump($stats);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 18
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k774V
function name:  (null)
number of ops:  24
compiled vars:  !0 = $stats_json, !1 = $stats_data, !2 = $stats
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7B%22id%22%3A%22http%3A%5C%2F%5C%2Fspin.loc%5C%2Farticles%5C%2F123123%5C%2F%22%2C%22count%22%3A12%7D'
    4     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
    5     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                                 
    7     8        INIT_FCALL                                               'var_dump'
          9        FETCH_OBJ_R                                      ~7      !2, 'count'
         10        SEND_VAL                                                 ~7
         11        DO_ICALL                                                 
    8    12        ISSET_ISEMPTY_PROP_OBJ                           ~9      !2, 'count'
         13        BOOL_NOT                                         ~10     ~9
         14      > JMPZ                                                     ~10, ->18
         15    >   FETCH_OBJ_R                                      ~11     !2, 'count'
         16        QM_ASSIGN                                        ~12     ~11
         17      > JMP                                                      ->19
         18    >   QM_ASSIGN                                        ~12     0
         19    >   ASSIGN                                                   !2, ~12
   10    20        INIT_FCALL                                               'var_dump'
         21        SEND_VAR                                                 !2
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.88 ms | 1395 KiB | 17 Q