3v4l.org

run code in 300+ PHP versions simultaneously
<?php $meta = [ 'stationFrom' => 'Antwerpen', 'stationTo' => 'London', 'places' => [1, 3, 4], ]; $formattedMeta = [ 'stationFrom' => 'Antwerpen', 'stationTo' => 'London', 'places' => function() { return implode(',', $meta); } ]; echo json_encode($formattedMeta);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NNkHZ
function name:  (null)
number of ops:  11
compiled vars:  !0 = $meta, !1 = $formattedMeta
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   10     1        INIT_ARRAY                                       ~3      'Antwerpen', 'stationFrom'
   11     2        ADD_ARRAY_ELEMENT                                ~3      'London', 'stationTo'
   12     3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FNNkHZ%3A12%240'
   14     4        ADD_ARRAY_ELEMENT                                ~3      ~4, 'places'
    9     5        ASSIGN                                                   !1, ~3
   17     6        INIT_FCALL                                               'json_encode'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $6      
          9        ECHO                                                     $6
         10      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FNNkHZ%3A12%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NNkHZ
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $meta
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'implode'
          1        SEND_VAL                                                 '%2C'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4      > RETURN                                                   $1
   14     5*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FNNkHZ%3A12%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.87 ms | 1386 KiB | 17 Q