3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = [ "shenzhen" => [ "宝安区", "南山区", "福田区", "罗湖区", "盐田区", "龙岗区", "光明新区", "坪山新区", "龙华新区", "大鹏新区", "其它" ], "guangzhou" => [ "白云区", "天河区", "海珠区", "番禺区", "花都区", "黄埔区", "南沙区", "越秀区", "萝岗区", "荔湾区", "增城市", "从化市", "其它" ]]; $city_list = array( "shenzhen" => _("深圳"), "guangzhou" => _("广州"), "foshan" => _("佛山"), "dongguan" => _("东莞")); $newArray = array(); foreach($city_list as $carr) { $newArray[] = str_replace(key($carr),"hello", $data); } print_r($newArray);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 20, Position 2 = 32
Branch analysis from position: 20
2 jumps found. (Code = 78) Position 1 = 21, Position 2 = 32
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
filename:       /in/XVoqh
function name:  (null)
number of ops:  37
compiled vars:  !0 = $data, !1 = $city_list, !2 = $newArray, !3 = $carr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   33     1        INIT_FCALL_BY_NAME                                       '_'
          2        SEND_VAL_EX                                              '%E6%B7%B1%E5%9C%B3'
          3        DO_FCALL                                      0  $5      
          4        INIT_ARRAY                                       ~6      $5, 'shenzhen'
   34     5        INIT_FCALL_BY_NAME                                       '_'
          6        SEND_VAL_EX                                              '%E5%B9%BF%E5%B7%9E'
          7        DO_FCALL                                      0  $7      
          8        ADD_ARRAY_ELEMENT                                ~6      $7, 'guangzhou'
   35     9        INIT_FCALL_BY_NAME                                       '_'
         10        SEND_VAL_EX                                              '%E4%BD%9B%E5%B1%B1'
         11        DO_FCALL                                      0  $8      
         12        ADD_ARRAY_ELEMENT                                ~6      $8, 'foshan'
   36    13        INIT_FCALL_BY_NAME                                       '_'
         14        SEND_VAL_EX                                              '%E4%B8%9C%E8%8E%9E'
         15        DO_FCALL                                      0  $9      
         16        ADD_ARRAY_ELEMENT                                ~6      $9, 'dongguan'
   32    17        ASSIGN                                                   !1, ~6
   38    18        ASSIGN                                                   !2, <array>
   39    19      > FE_RESET_R                                       $12     !1, ->32
         20    > > FE_FETCH_R                                               $12, !3, ->32
   40    21    >   INIT_FCALL                                               'str_replace'
         22        INIT_FCALL                                               'key'
         23        SEND_VAR                                                 !3
         24        DO_ICALL                                         $14     
         25        SEND_VAR                                                 $14
         26        SEND_VAL                                                 'hello'
         27        SEND_VAR                                                 !0
         28        DO_ICALL                                         $15     
         29        ASSIGN_DIM                                               !2
         30        OP_DATA                                                  $15
   39    31      > JMP                                                      ->20
         32    >   FE_FREE                                                  $12
   42    33        INIT_FCALL                                               'print_r'
         34        SEND_VAR                                                 !2
         35        DO_ICALL                                                 
         36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.48 ms | 1396 KiB | 19 Q