3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = new stdClass(); $result->GBP = "10.00"; $result->USD = "12.00"; foreach ($result as $currency => $value) { $currencyWithTax = $value .' + TAX'; $result->total[$currency] = $currencyWithTax; } print_r($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 16
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 16
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/fVjeN
function name:  (null)
number of ops:  21
compiled vars:  !0 = $result, !1 = $value, !2 = $currency, !3 = $currencyWithTax
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $4      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
    4     3        ASSIGN_OBJ                                               !0, 'GBP'
          4        OP_DATA                                                  '10.00'
    5     5        ASSIGN_OBJ                                               !0, 'USD'
          6        OP_DATA                                                  '12.00'
    8     7      > FE_RESET_R                                       $9      !0, ->16
          8    > > FE_FETCH_R                                       ~10     $9, !1, ->16
          9    >   ASSIGN                                                   !2, ~10
    9    10        CONCAT                                           ~12     !1, '+%2B+TAX'
         11        ASSIGN                                                   !3, ~12
   10    12        FETCH_OBJ_W                                      $14     !0, 'total'
         13        ASSIGN_DIM                                               $14, !2
         14        OP_DATA                                                  !3
    8    15      > JMP                                                      ->8
         16    >   FE_FREE                                                  $9
   13    17        INIT_FCALL                                               'print_r'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
247.87 ms | 1009 KiB | 14 Q