3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = new SimpleXMLElement('<root><elem>Text</elem></root>'); echo 'elem2 is: ' . ($xml->elem2 ?? 'backup string'); echo 'elem2 is: ' . (isset($xml->elem2) ? $xml->elem2 : 'backup string');
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 14
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DF8AE
function name:  (null)
number of ops:  18
compiled vars:  !0 = $xml
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $1      'SimpleXMLElement'
          1        SEND_VAL_EX                                              '%3Croot%3E%3Celem%3EText%3C%2Felem%3E%3C%2Froot%3E'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
    5     4        FETCH_OBJ_IS                                     ~4      !0, 'elem2'
          5        COALESCE                                         ~5      ~4
          6        QM_ASSIGN                                        ~5      'backup+string'
          7        CONCAT                                           ~6      'elem2+is%3A+', ~5
          8        ECHO                                                     ~6
    6     9        ISSET_ISEMPTY_PROP_OBJ                                   !0, 'elem2'
         10      > JMPZ                                                     ~7, ->14
         11    >   FETCH_OBJ_R                                      ~8      !0, 'elem2'
         12        QM_ASSIGN                                        ~9      ~8
         13      > JMP                                                      ->15
         14    >   QM_ASSIGN                                        ~9      'backup+string'
         15    >   CONCAT                                           ~10     'elem2+is%3A+', ~9
         16        ECHO                                                     ~10
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
195.66 ms | 1393 KiB | 13 Q