3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test_array = [(object) ['title' => 1], (object) ['title' => 2], (object) ['title' => 3]]; $result = implode(',', array_map(function($item) { return $item->title; }, $test_array)); var_dump($result); // string(5) "1,2,3"
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XH7K7
function name:  (null)
number of ops:  21
compiled vars:  !0 = $test_array, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   CAST                                          8  ~2      <array>
          1        INIT_ARRAY                                       ~3      ~2
          2        CAST                                          8  ~4      <array>
          3        ADD_ARRAY_ELEMENT                                ~3      ~4
          4        CAST                                          8  ~5      <array>
          5        ADD_ARRAY_ELEMENT                                ~3      ~5
          6        ASSIGN                                                   !0, ~3
    5     7        INIT_FCALL                                               'implode'
          8        SEND_VAL                                                 '%2C'
          9        INIT_FCALL                                               'array_map'
         10        DECLARE_LAMBDA_FUNCTION                          ~7      [0]
    6    11        SEND_VAL                                                 ~7
         12        SEND_VAR                                                 !0
    5    13        DO_ICALL                                         $8      
    6    14        SEND_VAR                                                 $8
    5    15        DO_ICALL                                         $9      
         16        ASSIGN                                                   !1, $9
    8    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                                 
         20      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XH7K7
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        FETCH_OBJ_R                                      ~1      !0, 'title'
          2      > RETURN                                                   ~1
          3*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.26 ms | 1002 KiB | 16 Q