3v4l.org

run code in 500+ PHP versions simultaneously
<?php $config = ['size' => -1]; if (isset($config['size']) && (int)$config['size'] > 0) { echo 'old'; } if ($configSize = (int)($config['size'] ?? 0)) { echo 'new'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 16
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
Branch analysis from position: 9
Branch analysis from position: 7
filename:       /in/Un06M
function name:  (null)
number of ops:  17
compiled vars:  !0 = $config, !1 = $configSize
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    5     1        ISSET_ISEMPTY_DIM_OBJ                             0  ~3      !0, 'size'
          2      > JMPZ_EX                                              ~3      ~3, ->7
          3    >   FETCH_DIM_R                                          ~4      !0, 'size'
          4        CAST                                              4  ~5      ~4
          5        IS_SMALLER                                           ~6      0, ~5
          6        BOOL                                                 ~3      ~6
          7    > > JMPZ                                                         ~3, ->9
    6     8    >   ECHO                                                         'old'
    9     9    >   FETCH_DIM_IS                                         ~7      !0, 'size'
         10        COALESCE                                             ~8      ~7
         11        QM_ASSIGN                                            ~8      0
         12        CAST                                              4  ~9      ~8
         13        ASSIGN                                               ~10     !1, ~9
         14      > JMPZ                                                         ~10, ->16
   10    15    >   ECHO                                                         'new'
   11    16    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
138.95 ms | 483 KiB | 9 Q