3v4l.org

run code in 300+ PHP versions simultaneously
<?php $val = [ ]; $ternary = $val['exists'] ?: 'no-tern'; $nullCo = $val['exists'] ?? 'no-null'; var_dump($ternary, $nullCo);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UjAGs
function name:  (null)
number of ops:  14
compiled vars:  !0 = $val, !1 = $ternary, !2 = $nullCo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    6     1        FETCH_DIM_R                                      ~4      !0, 'exists'
          2        JMP_SET                                          ~5      ~4, ->4
          3        QM_ASSIGN                                        ~5      'no-tern'
          4        ASSIGN                                                   !1, ~5
    7     5        FETCH_DIM_IS                                     ~7      !0, 'exists'
          6        COALESCE                                         ~8      ~7
          7        QM_ASSIGN                                        ~8      'no-null'
          8        ASSIGN                                                   !2, ~8
    9     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !1
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.75 ms | 1394 KiB | 15 Q