3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'string'; $offset = new stdClass(); $v1 = isset($str[$offset]) ? 'true' : 'false'; var_dump($v1); $v2 = $str[$offset] ?? 'false';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aDLLB
function name:  (null)
number of ops:  18
compiled vars:  !0 = $str, !1 = $offset, !2 = $v1, !3 = $v2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'string'
    4     1        NEW                                              $5      'stdClass'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $5
    6     4        ISSET_ISEMPTY_DIM_OBJ                         0          !0, !1
          5      > JMPZ                                                     ~8, ->8
          6    >   QM_ASSIGN                                        ~9      'true'
          7      > JMP                                                      ->9
          8    >   QM_ASSIGN                                        ~9      'false'
          9    >   ASSIGN                                                   !2, ~9
    7    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                                 
    8    13        FETCH_DIM_IS                                     ~12     !0, !1
         14        COALESCE                                         ~13     ~12
         15        QM_ASSIGN                                        ~13     'false'
         16        ASSIGN                                                   !3, ~13
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.85 ms | 1436 KiB | 14 Q