3v4l.org

run code in 500+ PHP versions simultaneously
<?php $cars = Array ( '0' => Array ( 'category' => 'Most Selling', 'title' => 'BMW', 'price' => 20000 ), '1' => Array ( 'category' => 'Most Selling', 'title' => 'Jeep', 'price' => 15000 ), '2' => Array ( 'category' => 'Most Selling', 'title' => 'Lexus', 'price' => 18000 ) ); $data = [ 'model' => 'new', 'company' => implode(', ',array_column($cars, 'title')) ]; echo $json = json_encode($data);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9IrW8
function name:  (null)
number of ops:  15
compiled vars:  !0 = $cars, !1 = $data, !2 = $json
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   21     1        INIT_ARRAY                                           ~4      'new', 'model'
   22     2        INIT_FCALL                                                   'array_column'
          3        SEND_VAR                                                     !0
          4        SEND_VAL                                                     'title'
          5        DO_ICALL                                             $5      
          6        FRAMELESS_ICALL_2                implode             ~6      '%2C+', $5
          7        ADD_ARRAY_ELEMENT                                    ~4      ~6, 'company'
   20     8        ASSIGN                                                       !1, ~4
   24     9        INIT_FCALL                                                   'json_encode'
         10        SEND_VAR                                                     !1
         11        DO_ICALL                                             $8      
         12        ASSIGN                                               ~9      !2, $8
         13        ECHO                                                         ~9
         14      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
208.92 ms | 2245 KiB | 15 Q