3v4l.org

run code in 300+ PHP versions simultaneously
<?php $columns = array( 0 => 'ISO', 1 => 'Country', 2 => 'Country Code', 3 => 'Type of number', 4 => 'Voice Enabled', 5 => 'SMS Enabled', 6 => 'MMS Enabled', 7 => 'Domestic Voice Only', 8 => 'Domestic SMS only', 9 => 'Price /num/month', 10 => 'Inbound Voice price/min', 11 => 'Inbound SMS price/msg ', 12 => 'Inbound MMS price/msg ', 13 => 'Beta Status', 14 => 'Address Required', ); $cols = array_filter($columns, '_filter_column_names'); function _filter_column_names($column_name){ $column_name = str_replace(' /', '_', $column_name); $column_name = strtolower(str_replace(array(' ', '/'), '_', trim($column_name))); echo $column_name.', '; return $column_name; } print_r($cols);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SttJ3
function name:  (null)
number of ops:  10
compiled vars:  !0 = $columns, !1 = $cols
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   22     1        INIT_FCALL                                               'array_filter'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '_filter_column_names'
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
   35     6        INIT_FCALL                                               'print_r'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function _filter_column_names:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SttJ3
function name:  _filter_column_names
number of ops:  23
compiled vars:  !0 = $column_name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   RECV                                             !0      
   26     1        INIT_FCALL                                               'str_replace'
          2        SEND_VAL                                                 '+%2F'
          3        SEND_VAL                                                 '_'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $1      
          6        ASSIGN                                                   !0, $1
   27     7        INIT_FCALL                                               'strtolower'
          8        INIT_FCALL                                               'str_replace'
          9        SEND_VAL                                                 <array>
         10        SEND_VAL                                                 '_'
         11        INIT_FCALL                                               'trim'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $3      
         14        SEND_VAR                                                 $3
         15        DO_ICALL                                         $4      
         16        SEND_VAR                                                 $4
         17        DO_ICALL                                         $5      
         18        ASSIGN                                                   !0, $5
   28    19        CONCAT                                           ~7      !0, '%2C+'
         20        ECHO                                                     ~7
   29    21      > RETURN                                                   !0
   30    22*     > RETURN                                                   null

End of function _filter_column_names

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
234.93 ms | 1003 KiB | 18 Q