3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = new stdClass(); $xml->return = new stdClass(); $xml->return->authtoken = 'Test'; print_r($xml->return->authtoken); foreach($xml->return->authtoken as $char){ echo "Char is $char \n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 18, Position 2 = 24
Branch analysis from position: 18
2 jumps found. (Code = 78) Position 1 = 19, Position 2 = 24
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/8EfYr
function name:  (null)
number of ops:  26
compiled vars:  !0 = $xml, !1 = $char
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $2      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    3     3        NEW                                              $6      'stdClass'
          4        DO_FCALL                                      0          
          5        ASSIGN_OBJ                                               !0, 'return'
          6        OP_DATA                                                  $6
    4     7        FETCH_OBJ_W                                      $8      !0, 'return'
          8        ASSIGN_OBJ                                               $8, 'authtoken'
          9        OP_DATA                                                  'Test'
    5    10        INIT_FCALL                                               'print_r'
         11        FETCH_OBJ_R                                      ~10     !0, 'return'
         12        FETCH_OBJ_R                                      ~11     ~10, 'authtoken'
         13        SEND_VAL                                                 ~11
         14        DO_ICALL                                                 
    6    15        FETCH_OBJ_R                                      ~13     !0, 'return'
         16        FETCH_OBJ_R                                      ~14     ~13, 'authtoken'
         17      > FE_RESET_R                                       $15     ~14, ->24
         18    > > FE_FETCH_R                                               $15, !1, ->24
    7    19    >   ROPE_INIT                                     3  ~17     'Char+is+'
         20        ROPE_ADD                                      1  ~17     ~17, !1
         21        ROPE_END                                      2  ~16     ~17, '+%0A'
         22        ECHO                                                     ~16
    6    23      > JMP                                                      ->18
         24    >   FE_FREE                                                  $15
    8    25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.75 ms | 1387 KiB | 15 Q