3v4l.org

run code in 300+ PHP versions simultaneously
<?php function show_spanish($n, $m) { return ("Nomor $n di spanyol disebut dengan $m"); } function map_spanish($n, $m) { return (array($n => $m)); } $a = array(1, 2, 3, 4, 5); $b = array("uno", "dos", "tres", "cuatro", "cinco"); $c = array_map("show_spanish", $a, $b); print_r($c); $d = array_map("map_spanish", $a, $b); print_r($d);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r3ctt
function name:  (null)
number of ops:  21
compiled vars:  !0 = $a, !1 = $b, !2 = $c, !3 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ASSIGN                                                   !0, <array>
   13     1        ASSIGN                                                   !1, <array>
   15     2        INIT_FCALL                                               'array_map'
          3        SEND_VAL                                                 'show_spanish'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !2, $6
   16     8        INIT_FCALL                                               'print_r'
          9        SEND_VAR                                                 !2
         10        DO_ICALL                                                 
   18    11        INIT_FCALL                                               'array_map'
         12        SEND_VAL                                                 'map_spanish'
         13        SEND_VAR                                                 !0
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                         $9      
         16        ASSIGN                                                   !3, $9
   19    17        INIT_FCALL                                               'print_r'
         18        SEND_VAR                                                 !3
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Function show_spanish:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r3ctt
function name:  show_spanish
number of ops:  8
compiled vars:  !0 = $n, !1 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        ROPE_INIT                                     4  ~3      'Nomor+'
          3        ROPE_ADD                                      1  ~3      ~3, !0
          4        ROPE_ADD                                      2  ~3      ~3, '+di+spanyol+disebut+dengan+'
          5        ROPE_END                                      3  ~2      ~3, !1
          6      > RETURN                                                   ~2
    5     7*     > RETURN                                                   null

End of function show_spanish

Function map_spanish:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r3ctt
function name:  map_spanish
number of ops:  5
compiled vars:  !0 = $n, !1 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    9     2        INIT_ARRAY                                       ~2      !1, !0
          3      > RETURN                                                   ~2
   10     4*     > RETURN                                                   null

End of function map_spanish

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.38 ms | 1396 KiB | 17 Q