3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = "test"; var_dump($foo[0] ?? "default"); var_dump($foo[5] ?? "default"); var_dump(isset($foo[5]) ? $foo[5] : "default");
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 19
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lsoFA
function name:  (null)
number of ops:  23
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'test'
    5     1        INIT_FCALL                                               'var_dump'
          2        FETCH_DIM_IS                                     ~2      !0, 0
          3        COALESCE                                         ~3      ~2
          4        QM_ASSIGN                                        ~3      'default'
          5        SEND_VAL                                                 ~3
          6        DO_ICALL                                                 
    6     7        INIT_FCALL                                               'var_dump'
          8        FETCH_DIM_IS                                     ~5      !0, 5
          9        COALESCE                                         ~6      ~5
         10        QM_ASSIGN                                        ~6      'default'
         11        SEND_VAL                                                 ~6
         12        DO_ICALL                                                 
    7    13        INIT_FCALL                                               'var_dump'
         14        ISSET_ISEMPTY_DIM_OBJ                         0          !0, 5
         15      > JMPZ                                                     ~8, ->19
         16    >   FETCH_DIM_R                                      ~9      !0, 5
         17        QM_ASSIGN                                        ~10     ~9
         18      > JMP                                                      ->20
         19    >   QM_ASSIGN                                        ~10     'default'
         20    >   SEND_VAL                                                 ~10
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
192.2 ms | 1395 KiB | 15 Q