3v4l.org

run code in 300+ PHP versions simultaneously
<?php $action = $p['action'] ?: 'index'; echo $action; $action = @$p['action'] ?: 'index'; echo $action; $action = $p['action'] ?? 'index'; echo $action;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Whr70
function name:  (null)
number of ops:  18
compiled vars:  !0 = $action, !1 = $p
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   FETCH_DIM_R                                      ~2      !1, 'action'
          1        JMP_SET                                          ~3      ~2, ->3
          2        QM_ASSIGN                                        ~3      'index'
          3        ASSIGN                                                   !0, ~3
    4     4        ECHO                                                     !0
    5     5        BEGIN_SILENCE                                    ~5      
          6        FETCH_DIM_R                                      ~6      !1, 'action'
          7        END_SILENCE                                              ~5
          8        JMP_SET                                          ~7      ~6, ->10
          9        QM_ASSIGN                                        ~7      'index'
         10        ASSIGN                                                   !0, ~7
    6    11        ECHO                                                     !0
    7    12        FETCH_DIM_IS                                     ~9      !1, 'action'
         13        COALESCE                                         ~10     ~9
         14        QM_ASSIGN                                        ~10     'index'
         15        ASSIGN                                                   !0, ~10
    8    16        ECHO                                                     !0
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
135.32 ms | 1397 KiB | 13 Q