3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(-1); $data = array ( 'tram B' => array ( 0 => array ( 'name' => 'Ile Verte' , 'distance' => 298, 'stationID' => 762, ), 1 => array ( 'name' => 'La Tronche Hôpital' , 'distance' => 425, 'stationID' => 771, ), ), 16 => array ( 0 => array ( 'name' => 'Bastille', 'distance' => 531, 'stationID' => 397 ), 1 => array ( 'name' => 'Xavier Jouvin', 'distance' => 589, 'stationID' => 438, ), ), ); $data['tram B'][1]['name'] = iconv('UTF8', 'ISO-8859-1', $data['tram B'][1]['name']); var_dump(mb_detect_encoding($data), json_encode($data));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XSnBt
function name:  (null)
number of ops:  28
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 -1
          2        DO_ICALL                                                 
    4     3        ASSIGN                                                   !0, <array>
   37     4        INIT_FCALL_BY_NAME                                       'iconv'
          5        SEND_VAL_EX                                              'UTF8'
          6        SEND_VAL_EX                                              'ISO-8859-1'
          7        CHECK_FUNC_ARG                                           
          8        FETCH_DIM_FUNC_ARG                               $6      !0, 'tram+B'
          9        FETCH_DIM_FUNC_ARG                               $7      $6, 1
         10        FETCH_DIM_FUNC_ARG                               $8      $7, 'name'
         11        SEND_FUNC_ARG                                            $8
         12        DO_FCALL                                      0  $9      
         13        FETCH_DIM_W                                      $3      !0, 'tram+B'
         14        FETCH_DIM_W                                      $4      $3, 1
         15        ASSIGN_DIM                                               $4, 'name'
         16        OP_DATA                                                  $9
   39    17        INIT_FCALL                                               'var_dump'
         18        INIT_FCALL                                               'mb_detect_encoding'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                         $10     
         21        SEND_VAR                                                 $10
         22        INIT_FCALL                                               'json_encode'
         23        SEND_VAR                                                 !0
         24        DO_ICALL                                         $11     
         25        SEND_VAR                                                 $11
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.07 ms | 1387 KiB | 21 Q