3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = Array ( 1 => Array ( 'symbol' => 'salad' ), 2 => Array ( 'symbol' => 'wine' ), 3 => Array ( 'symbol' => 'beer' ) ); $symbols = array_column($data, "symbol"); if (count($symbols)) { echo implode("bar, ", $symbols)."bar"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 14
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/ms5Ot
function name:  (null)
number of ops:  15
compiled vars:  !0 = $data, !1 = $symbols
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   20     1        INIT_FCALL                                               'array_column'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 'symbol'
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
   21     6        COUNT                                            ~5      !1
          7      > JMPZ                                                     ~5, ->14
   22     8    >   INIT_FCALL                                               'implode'
          9        SEND_VAL                                                 'bar%2C+'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $6      
         12        CONCAT                                           ~7      $6, 'bar'
         13        ECHO                                                     ~7
   23    14    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.45 ms | 1002 KiB | 15 Q