3v4l.org

run code in 500+ PHP versions simultaneously
<?php $a = (object)[]; for ($x = 0; $x < 2; ++$x) { /*if (!property_exists($a, 'color')) { $a->color = (object)[]; }*/ $a->color->price = ($a->color->price ?? "2") . "5"; } var_export($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 4
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 4
Branch analysis from position: 15
Branch analysis from position: 4
filename:       /in/mmLdJ
function name:  (null)
number of ops:  19
compiled vars:  !0 = $a, !1 = $x
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   CAST                                              8  ~2      <array>
          1        ASSIGN                                                       !0, ~2
    4     2        ASSIGN                                                       !1, 0
          3      > JMP                                                          ->13
    8     4    >   FETCH_OBJ_IS                                         ~7      !0, 'color'
          5        FETCH_OBJ_IS                                         ~8      ~7, 'price'
          6        COALESCE                                             ~9      ~8
          7        QM_ASSIGN                                            ~9      '2'
          8        CONCAT                                               ~10     ~9, '5'
          9        FETCH_OBJ_W                                          $5      !0, 'color'
         10        ASSIGN_OBJ                                                   $5, 'price'
         11        OP_DATA                                                      ~10
    4    12        PRE_INC                                                      !1
         13    >   IS_SMALLER                                                   !1, 2
         14      > JMPNZ                                                        ~12, ->4
   10    15    >   INIT_FCALL                                                   'var_export'
         16        SEND_VAR                                                     !0
         17        DO_ICALL                                                     
         18      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
171.97 ms | 2195 KiB | 14 Q