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['tram B'][1]['name']), json_encode($data));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/u9g6Y
function name:  (null)
number of ops:  31
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        FETCH_DIM_R                                      ~10     !0, 'tram+B'
         20        FETCH_DIM_R                                      ~11     ~10, 1
         21        FETCH_DIM_R                                      ~12     ~11, 'name'
         22        SEND_VAL                                                 ~12
         23        DO_ICALL                                         $13     
         24        SEND_VAR                                                 $13
         25        INIT_FCALL                                               'json_encode'
         26        SEND_VAR                                                 !0
         27        DO_ICALL                                         $14     
         28        SEND_VAR                                                 $14
         29        DO_ICALL                                                 
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.95 ms | 1395 KiB | 21 Q