3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = <<<JSON { "responseHeader":{ "status":0, "QTime":74 }, "initFailures":{}, "status":{ "Test17Jan":{ "name":"Test17Jan" }, "Test8Feb":{ "name":"Test8Feb" } } } JSON; $solr = json_decode($json); foreach ($solr->status as $core) { echo "Found core ". $core->name . PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 13
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 13
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/VcBDV
function name:  (null)
number of ops:  15
compiled vars:  !0 = $json, !1 = $solr, !2 = $core
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7B%0A++%22responseHeader%22%3A%7B%0A++++%22status%22%3A0%2C%0A++++%22QTime%22%3A74%0A++%7D%2C%0A++%22initFailures%22%3A%7B%7D%2C%0A++%22status%22%3A%7B%0A++++%22Test17Jan%22%3A%7B%0A++++++%22name%22%3A%22Test17Jan%22%0A++++%7D%2C%0A++++%22Test8Feb%22%3A%7B%0A++++++%22name%22%3A%22Test8Feb%22%0A++++%7D%0A++%7D%0A%7D'
   21     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
   23     5        FETCH_OBJ_R                                      ~6      !1, 'status'
          6      > FE_RESET_R                                       $7      ~6, ->13
          7    > > FE_FETCH_R                                               $7, !2, ->13
   24     8    >   FETCH_OBJ_R                                      ~8      !2, 'name'
          9        CONCAT                                           ~9      'Found+core+', ~8
         10        CONCAT                                           ~10     ~9, '%0A'
         11        ECHO                                                     ~10
   23    12      > JMP                                                      ->7
         13    >   FE_FREE                                                  $7
   25    14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
257.63 ms | 1001 KiB | 14 Q