3v4l.org

run code in 300+ PHP versions simultaneously
<?php $names = [ ['Joe','Moe','Joey'], ['John','Doe','Curly'], ['Jimmy','Fallon','Funny'] ]; $output = implode(",", array_map(function($row) { return sprintf("(%s)", implode(",", array_map(function($name) { return "'$name'"; }, $row))); }, $names)); echo $output;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PLu1g
function name:  (null)
number of ops:  13
compiled vars:  !0 = $names, !1 = $output
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        INIT_FCALL                                               'implode'
          2        SEND_VAL                                                 '%2C'
          3        INIT_FCALL                                               'array_map'
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FPLu1g%3A9%240'
   13     5        SEND_VAL                                                 ~3
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $4      
          8        SEND_VAR                                                 $4
          9        DO_ICALL                                         $5      
    9    10        ASSIGN                                                   !1, $5
   15    11        ECHO                                                     !1
   16    12      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FPLu1g%3A9%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PLu1g
function name:  {closure}
number of ops:  16
compiled vars:  !0 = $row
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        INIT_FCALL                                               'sprintf'
          2        SEND_VAL                                                 '%28%25s%29'
          3        INIT_FCALL                                               'implode'
          4        SEND_VAL                                                 '%2C'
          5        INIT_FCALL                                               'array_map'
          6        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FPLu1g%3A10%241'
   12     7        SEND_VAL                                                 ~1
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $2      
         10        SEND_VAR                                                 $2
         11        DO_ICALL                                         $3      
         12        SEND_VAR                                                 $3
         13        DO_ICALL                                         $4      
         14      > RETURN                                                   $4
   13    15*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FPLu1g%3A9%240

Function %00%7Bclosure%7D%2Fin%2FPLu1g%3A10%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PLu1g
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   11     1        ROPE_INIT                                     3  ~2      '%27'
          2        ROPE_ADD                                      1  ~2      ~2, !0
          3        ROPE_END                                      2  ~1      ~2, '%27'
          4      > RETURN                                                   ~1
   12     5*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FPLu1g%3A10%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.06 ms | 1400 KiB | 19 Q