3v4l.org

run code in 300+ PHP versions simultaneously
<?php $urls = [ 'https://google.com/', 'https://bing.com/' ]; $names = [ 'Google', 'Bing' ]; $combined = array_map( fn($url, $name) => ['url' => $domain, 'name' => $name], $urls, $names ); echo(json_encode($combined));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9rs88
function name:  (null)
number of ops:  15
compiled vars:  !0 = $urls, !1 = $names, !2 = $combined, !3 = $domain
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    8     1        ASSIGN                                                   !1, <array>
   13     2        INIT_FCALL                                               'array_map'
   14     3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F9rs88%3A14%240'
          4        BIND_LEXICAL                                             ~6, !3
          5        SEND_VAL                                                 ~6
   15     6        SEND_VAR                                                 !0
   16     7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $7      
   13     9        ASSIGN                                                   !2, $7
   19    10        INIT_FCALL                                               'json_encode'
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                         $9      
         13        ECHO                                                     $9
         14      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F9rs88%3A14%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9rs88
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $url, !1 = $name, !2 = $domain
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        BIND_STATIC                                              !2
          3        INIT_ARRAY                                       ~3      !2, 'url'
          4        ADD_ARRAY_ELEMENT                                ~3      !1, 'name'
          5      > RETURN                                                   ~3
          6*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F9rs88%3A14%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.83 ms | 1395 KiB | 17 Q