3v4l.org

run code in 300+ PHP versions simultaneously
<?php $paths = array( 20 => array( 'name' => 'Heels', 'path' => '1/2/10/15/20', ), 15 => array( 'name' => 'Sandals', 'path' => '1/2/80/96/15', ), 10 => array( 'name' => 'Trainers', 'path' => '1/2/80/96/10', ), ); arsort($paths); $breadcrumb = (object) array( 'value' => array_keys($paths)[count($paths)-1], 'labels' => implode(' > ', array_column($paths, 'name')) ); var_dump($breadcrumb);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1lndS
function name:  (null)
number of ops:  26
compiled vars:  !0 = $paths, !1 = $breadcrumb
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   21     1        INIT_FCALL                                               'arsort'
          2        SEND_REF                                                 !0
          3        DO_ICALL                                                 
   24     4        INIT_FCALL                                               'array_keys'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $4      
          7        COUNT                                            ~5      !0
          8        SUB                                              ~6      ~5, 1
          9        FETCH_DIM_R                                      ~7      $4, ~6
         10        INIT_ARRAY                                       ~8      ~7, 'value'
   25    11        INIT_FCALL                                               'implode'
         12        SEND_VAL                                                 '+%3E+'
         13        INIT_FCALL                                               'array_column'
         14        SEND_VAR                                                 !0
         15        SEND_VAL                                                 'name'
         16        DO_ICALL                                         $9      
         17        SEND_VAR                                                 $9
         18        DO_ICALL                                         $10     
         19        ADD_ARRAY_ELEMENT                                ~8      $10, 'labels'
         20        CAST                                          8  ~11     ~8
   23    21        ASSIGN                                                   !1, ~11
   28    22        INIT_FCALL                                               'var_dump'
         23        SEND_VAR                                                 !1
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.57 ms | 1014 KiB | 18 Q