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'); $mapped = array_map(function($e){ return $e . "bar"; },$symbols); $string_from_array = join(", ",$mapped); echo($string_from_array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QbDmi
function name:  (null)
number of ops:  19
compiled vars:  !0 = $data, !1 = $symbols, !2 = $mapped, !3 = $string_from_array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   14     1        INIT_FCALL                                               'array_column'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 'symbol'
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
   15     6        INIT_FCALL                                               'array_map'
          7        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FQbDmi%3A15%240'
   17     8        SEND_VAL                                                 ~7
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $8      
   15    11        ASSIGN                                                   !2, $8
   18    12        INIT_FCALL                                               'join'
         13        SEND_VAL                                                 '%2C+'
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                         $10     
         16        ASSIGN                                                   !3, $10
   19    17        ECHO                                                     !3
         18      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FQbDmi%3A15%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QbDmi
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
   16     1        CONCAT                                           ~1      !0, 'bar'
          2      > RETURN                                                   ~1
   17     3*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FQbDmi%3A15%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.86 ms | 1400 KiB | 19 Q