3v4l.org

run code in 300+ PHP versions simultaneously
<?php $attributes = ['Type' => 'MyType']; $payload = "Frankfurt"; var_dump(['one'=>'two']+['one'=>'three']); $jobMessage = [ 'MessageBody' => json_encode($payload), 'MessageAttributes' => array_merge([ "Type" => [ 'StringValue' => __CLASS__, 'DataType' => 'String' ] ], array_values(array_map( function($name, $value) { return [ "$name" => [ 'DataType' => 'String', 'StringValue' => $value, ] ]; }, array_keys($attributes), array_values($attributes) )) ) ]; var_dump($jobMessage);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/REJEi
function name:  (null)
number of ops:  34
compiled vars:  !0 = $attributes, !1 = $payload, !2 = $jobMessage
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, 'Frankfurt'
    4     2        INIT_FCALL                                               'var_dump'
          3        SEND_VAL                                                 <array>
          4        DO_ICALL                                                 
    6     5        INIT_FCALL                                               'json_encode'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $6      
          8        INIT_ARRAY                                       ~7      $6, 'MessageBody'
    8     9        INIT_FCALL                                               'array_merge'
   10    10        SEND_VAL                                                 <array>
   14    11        INIT_FCALL                                               'array_values'
         12        INIT_FCALL                                               'array_map'
   15    13        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FREJEi%3A15%240'
   22    14        SEND_VAL                                                 ~8
   23    15        INIT_FCALL                                               'array_keys'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $9      
         18        SEND_VAR                                                 $9
   24    19        INIT_FCALL                                               'array_values'
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                         $10     
         22        SEND_VAR                                                 $10
         23        DO_ICALL                                         $11     
         24        SEND_VAR                                                 $11
         25        DO_ICALL                                         $12     
         26        SEND_VAR                                                 $12
         27        DO_ICALL                                         $13     
         28        ADD_ARRAY_ELEMENT                                ~7      $13, 'MessageAttributes'
    5    29        ASSIGN                                                   !2, ~7
   28    30        INIT_FCALL                                               'var_dump'
         31        SEND_VAR                                                 !2
         32        DO_ICALL                                                 
         33      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FREJEi%3A15%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/REJEi
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $name, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   17     2        CAST                                          6  ~2      !0
   18     3        INIT_ARRAY                                       ~3      'String', 'DataType'
   19     4        ADD_ARRAY_ELEMENT                                ~3      !1, 'StringValue'
          5        INIT_ARRAY                                       ~4      ~3, ~2
          6      > RETURN                                                   ~4
   22     7*     > RETURN                                                   null

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.77 ms | 1400 KiB | 25 Q