3v4l.org

run code in 300+ PHP versions simultaneously
<?php $emptyobject = new stdClass(); foreach ($emptyobject as $key => $value) { echo "Empty object: {$key} = {$value}\n"; } $filledobject = new stdClass(); $filledobject->foo = "foo"; $filledobject->bar = "bar"; foreach ($filledobject as $key => $value) { echo "Filled object: {$key} = {$value}\n"; } $string = "abc"; foreach ($string as $key => $value) { echo "String: {$key} = {$value}\n"; } $number = 123; foreach ($number as $key => $value) { echo "Number: {$key} = {$value}\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 13
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 13
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 13
2 jumps found. (Code = 77) Position 1 = 22, Position 2 = 31
Branch analysis from position: 22
2 jumps found. (Code = 78) Position 1 = 23, Position 2 = 31
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
Branch analysis from position: 31
2 jumps found. (Code = 77) Position 1 = 34, Position 2 = 43
Branch analysis from position: 34
2 jumps found. (Code = 78) Position 1 = 35, Position 2 = 43
Branch analysis from position: 35
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
Branch analysis from position: 43
2 jumps found. (Code = 77) Position 1 = 46, Position 2 = 55
Branch analysis from position: 46
2 jumps found. (Code = 78) Position 1 = 47, Position 2 = 55
Branch analysis from position: 47
1 jumps found. (Code = 42) Position 1 = 46
Branch analysis from position: 46
Branch analysis from position: 55
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 55
Branch analysis from position: 43
Branch analysis from position: 31
Branch analysis from position: 13
filename:       /in/CCrFo
function name:  (null)
number of ops:  57
compiled vars:  !0 = $emptyobject, !1 = $value, !2 = $key, !3 = $filledobject, !4 = $string, !5 = $number
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $6      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $6
    4     3      > FE_RESET_R                                       $9      !0, ->13
          4    > > FE_FETCH_R                                       ~10     $9, !1, ->13
          5    >   ASSIGN                                                   !2, ~10
    5     6        ROPE_INIT                                     5  ~13     'Empty+object%3A+'
          7        ROPE_ADD                                      1  ~13     ~13, !2
          8        ROPE_ADD                                      2  ~13     ~13, '+%3D+'
          9        ROPE_ADD                                      3  ~13     ~13, !1
         10        ROPE_END                                      4  ~12     ~13, '%0A'
         11        ECHO                                                     ~12
    4    12      > JMP                                                      ->4
         13    >   FE_FREE                                                  $9
    8    14        NEW                                              $16     'stdClass'
         15        DO_FCALL                                      0          
         16        ASSIGN                                                   !3, $16
    9    17        ASSIGN_OBJ                                               !3, 'foo'
         18        OP_DATA                                                  'foo'
   10    19        ASSIGN_OBJ                                               !3, 'bar'
         20        OP_DATA                                                  'bar'
   11    21      > FE_RESET_R                                       $21     !3, ->31
         22    > > FE_FETCH_R                                       ~22     $21, !1, ->31
         23    >   ASSIGN                                                   !2, ~22
   12    24        ROPE_INIT                                     5  ~25     'Filled+object%3A+'
         25        ROPE_ADD                                      1  ~25     ~25, !2
         26        ROPE_ADD                                      2  ~25     ~25, '+%3D+'
         27        ROPE_ADD                                      3  ~25     ~25, !1
         28        ROPE_END                                      4  ~24     ~25, '%0A'
         29        ECHO                                                     ~24
   11    30      > JMP                                                      ->22
         31    >   FE_FREE                                                  $21
   15    32        ASSIGN                                                   !4, 'abc'
   16    33      > FE_RESET_R                                       $29     !4, ->43
         34    > > FE_FETCH_R                                       ~30     $29, !1, ->43
         35    >   ASSIGN                                                   !2, ~30
   17    36        ROPE_INIT                                     5  ~33     'String%3A+'
         37        ROPE_ADD                                      1  ~33     ~33, !2
         38        ROPE_ADD                                      2  ~33     ~33, '+%3D+'
         39        ROPE_ADD                                      3  ~33     ~33, !1
         40        ROPE_END                                      4  ~32     ~33, '%0A'
         41        ECHO                                                     ~32
   16    42      > JMP                                                      ->34
         43    >   FE_FREE                                                  $29
   20    44        ASSIGN                                                   !5, 123
   21    45      > FE_RESET_R                                       $37     !5, ->55
         46    > > FE_FETCH_R                                       ~38     $37, !1, ->55
         47    >   ASSIGN                                                   !2, ~38
   22    48        ROPE_INIT                                     5  ~41     'Number%3A+'
         49        ROPE_ADD                                      1  ~41     ~41, !2
         50        ROPE_ADD                                      2  ~41     ~41, '+%3D+'
         51        ROPE_ADD                                      3  ~41     ~41, !1
         52        ROPE_END                                      4  ~40     ~41, '%0A'
         53        ECHO                                                     ~40
   21    54      > JMP                                                      ->46
         55    >   FE_FREE                                                  $37
   23    56      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.35 ms | 1004 KiB | 13 Q