3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = array ( array ( 'code_sni' => 'QP2' , 'libelle_sni' => 'TransacTIS Société Générale TéLéCollecte pour acquisition des remises commerçants via TPE (Terminal de Paiement Electronique) et TLP (TéLéParamétrage) des TPE', 'si' => 'LBP' ), array ( 'code_sni' => 'QP2', 'libelle_sni' => 'Gestionnaire Echange CRO', 'si' => 'RLP' ) ); function implode_array_values($key,$input) { return implode(', ', array_map(function($entry) use ($key) { return $entry[$key]; }, $input)); } var_dump(implode_array_values('code_sni',$input)); echo count($input);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eY50I
function name:  (null)
number of ops:  11
compiled vars:  !0 = $input
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   19     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'implode_array_values'
          3        SEND_VAL                                                 'code_sni'
          4        SEND_VAR                                                 !0
          5        DO_FCALL                                      0  $2      
          6        SEND_VAR                                                 $2
          7        DO_ICALL                                                 
   20     8        COUNT                                            ~4      !0
          9        ECHO                                                     ~4
         10      > RETURN                                                   1

Function implode_array_values:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eY50I
function name:  implode_array_values
number of ops:  14
compiled vars:  !0 = $key, !1 = $input
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   14     2        INIT_FCALL                                               'implode'
          3        SEND_VAL                                                 '%2C+'
          4        INIT_FCALL                                               'array_map'
          5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FeY50I%3A14%240'
          6        BIND_LEXICAL                                             ~2, !0
   16     7        SEND_VAL                                                 ~2
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $3      
         10        SEND_VAR                                                 $3
         11        DO_ICALL                                         $4      
         12      > RETURN                                                   $4
   17    13*     > RETURN                                                   null

End of function implode_array_values

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

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
198.94 ms | 1399 KiB | 20 Q