3v4l.org

run code in 300+ PHP versions simultaneously
<?php function array2CSVarray(array $array) { $sanitized = array(); foreach ($array as $col) { $col = str_replace(array('\\', '"'), array('\/', '\"')); $sanitized[] = "\"$col\""; } return implode(',', $sanitized); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r350S
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E > > RETURN                                                   1

Function array2csvarray:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 15
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 15
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/r350S
function name:  array2CSVarray
number of ops:  22
compiled vars:  !0 = $array, !1 = $sanitized, !2 = $col
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ASSIGN                                                   !1, <array>
    5     2      > FE_RESET_R                                       $4      !0, ->15
          3    > > FE_FETCH_R                                               $4, !2, ->15
    6     4    >   INIT_FCALL                                               'str_replace'
          5        SEND_VAL                                                 <array>
          6        SEND_VAL                                                 <array>
          7        DO_ICALL                                         $5      
          8        ASSIGN                                                   !2, $5
    7     9        ROPE_INIT                                     3  ~9      '%22'
         10        ROPE_ADD                                      1  ~9      ~9, !2
         11        ROPE_END                                      2  ~8      ~9, '%22'
         12        ASSIGN_DIM                                               !1
         13        OP_DATA                                                  ~8
    5    14      > JMP                                                      ->3
         15    >   FE_FREE                                                  $4
    9    16        INIT_FCALL                                               'implode'
         17        SEND_VAL                                                 '%2C'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                         $11     
         20      > RETURN                                                   $11
   10    21*     > RETURN                                                   null

End of function array2csvarray

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.41 ms | 1395 KiB | 17 Q