3v4l.org

run code in 300+ PHP versions simultaneously
<?php // 获取user参数的值(如果为空,则用'nobody') $username = $_GET['user'] ?: 'nobody'; // 等价于: $username = isset($_GET['user']) ? $_GET['user'] : 'nobody'; echo $username;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 12
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/q8gPN
function name:  (null)
number of ops:  16
compiled vars:  !0 = $username
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   FETCH_R                      global              ~1      '_GET'
          1        FETCH_DIM_R                                      ~2      ~1, 'user'
          2        JMP_SET                                          ~3      ~2, ->4
          3        QM_ASSIGN                                        ~3      'nobody'
          4        ASSIGN                                                   !0, ~3
    6     5        FETCH_IS                                         ~5      '_GET'
          6        ISSET_ISEMPTY_DIM_OBJ                         0          ~5, 'user'
          7      > JMPZ                                                     ~6, ->12
          8    >   FETCH_R                      global              ~7      '_GET'
          9        FETCH_DIM_R                                      ~8      ~7, 'user'
         10        QM_ASSIGN                                        ~9      ~8
         11      > JMP                                                      ->13
         12    >   QM_ASSIGN                                        ~9      'nobody'
         13    >   ASSIGN                                                   !0, ~9
    8    14        ECHO                                                     !0
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.4 ms | 1393 KiB | 13 Q