3v4l.org

run code in 300+ PHP versions simultaneously
<?php $response = [ 'id' => 10499478683521864, 'birthday' => '07/22/1983', 'email' => 'email@saya.com', 'first_name' => 'Alan', 'gender' => 'male', 'last_name' => 'Malmsteen', 'link' => 'https://www.facebook.com/app_scoped_user_id/1049213468352864/', 'location' => (object) [ 'id' => 102173722491792, 'name' => 'Jakarta, Indonesia' ], 'locale' => 'id_ID', 'middle_name' => 'El-nino', 'name' => 'Alan El-nino Malmsteen', 'timezone' => 7, 'updated_time' => '2015-05-28T04:09:50+0000', 'verified' => 1 ]; foreach ($response as $key1 => $value1) { if (is_array($value1) || is_object($value1)) { foreach ($value1 as $key2 => $value2) { echo "Key1: $key1, Key2: $key2, Value2: $value2\n"; } } else { echo "Key1: $key1, Value1: $value1\n"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 17, Position 2 = 45
Branch analysis from position: 17
2 jumps found. (Code = 78) Position 1 = 18, Position 2 = 45
Branch analysis from position: 18
2 jumps found. (Code = 47) Position 1 = 21, Position 2 = 23
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 38
Branch analysis from position: 24
2 jumps found. (Code = 77) Position 1 = 25, Position 2 = 36
Branch analysis from position: 25
2 jumps found. (Code = 78) Position 1 = 26, Position 2 = 36
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
Branch analysis from position: 36
1 jumps found. (Code = 42) Position 1 = 44
Branch analysis from position: 44
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 36
Branch analysis from position: 38
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 23
Branch analysis from position: 45
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 45
filename:       /in/CQpTO
function name:  (null)
number of ops:  47
compiled vars:  !0 = $response, !1 = $value1, !2 = $key1, !3 = $value2, !4 = $key2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_ARRAY                                       ~5      10499478683521864, 'id'
    5     1        ADD_ARRAY_ELEMENT                                ~5      '07%2F22%2F1983', 'birthday'
    6     2        ADD_ARRAY_ELEMENT                                ~5      'email%40saya.com', 'email'
    7     3        ADD_ARRAY_ELEMENT                                ~5      'Alan', 'first_name'
    8     4        ADD_ARRAY_ELEMENT                                ~5      'male', 'gender'
    9     5        ADD_ARRAY_ELEMENT                                ~5      'Malmsteen', 'last_name'
   10     6        ADD_ARRAY_ELEMENT                                ~5      'https%3A%2F%2Fwww.facebook.com%2Fapp_scoped_user_id%2F1049213468352864%2F', 'link'
   12     7        CAST                                          8  ~6      <array>
          8        ADD_ARRAY_ELEMENT                                ~5      ~6, 'location'
   15     9        ADD_ARRAY_ELEMENT                                ~5      'id_ID', 'locale'
   16    10        ADD_ARRAY_ELEMENT                                ~5      'El-nino', 'middle_name'
   17    11        ADD_ARRAY_ELEMENT                                ~5      'Alan+El-nino+Malmsteen', 'name'
   18    12        ADD_ARRAY_ELEMENT                                ~5      7, 'timezone'
   19    13        ADD_ARRAY_ELEMENT                                ~5      '2015-05-28T04%3A09%3A50%2B0000', 'updated_time'
   20    14        ADD_ARRAY_ELEMENT                                ~5      1, 'verified'
    3    15        ASSIGN                                                   !0, ~5
   22    16      > FE_RESET_R                                       $8      !0, ->45
         17    > > FE_FETCH_R                                       ~9      $8, !1, ->45
         18    >   ASSIGN                                                   !2, ~9
   23    19        TYPE_CHECK                                  128  ~11     !1
         20      > JMPNZ_EX                                         ~11     ~11, ->23
         21    >   TYPE_CHECK                                  256  ~12     !1
         22        BOOL                                             ~11     ~12
         23    > > JMPZ                                                     ~11, ->38
   24    24    > > FE_RESET_R                                       $13     !1, ->36
         25    > > FE_FETCH_R                                       ~14     $13, !3, ->36
         26    >   ASSIGN                                                   !4, ~14
   25    27        ROPE_INIT                                     7  ~17     'Key1%3A+'
         28        ROPE_ADD                                      1  ~17     ~17, !2
         29        ROPE_ADD                                      2  ~17     ~17, '%2C+Key2%3A+'
         30        ROPE_ADD                                      3  ~17     ~17, !4
         31        ROPE_ADD                                      4  ~17     ~17, '%2C+Value2%3A+'
         32        ROPE_ADD                                      5  ~17     ~17, !3
         33        ROPE_END                                      6  ~16     ~17, '%0A'
         34        ECHO                                                     ~16
   24    35      > JMP                                                      ->25
         36    >   FE_FREE                                                  $13
   23    37      > JMP                                                      ->44
   28    38    >   ROPE_INIT                                     5  ~22     'Key1%3A+'
         39        ROPE_ADD                                      1  ~22     ~22, !2
         40        ROPE_ADD                                      2  ~22     ~22, '%2C+Value1%3A+'
         41        ROPE_ADD                                      3  ~22     ~22, !1
         42        ROPE_END                                      4  ~21     ~22, '%0A'
         43        ECHO                                                     ~21
   22    44    > > JMP                                                      ->17
         45    >   FE_FREE                                                  $8
   30    46      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.55 ms | 1007 KiB | 13 Q