3v4l.org

run code in 300+ PHP versions simultaneously
<?php mb_internal_encoding('UTF-8'); mb_http_output('UTF-8'); $someFoo = '{ "Foo" : "Bar" }'; echo mb_detect_encoding($asciiData) . "\r\n"; var_dump(json_decode($asciiData)); $utf8Data = utf8_encode($someFoo); echo mb_detect_encoding($utf8Data) . "\r\n"; var_dump(json_decode($utf8Data));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bpMEH
function name:  (null)
number of ops:  34
compiled vars:  !0 = $someFoo, !1 = $asciiData, !2 = $utf8Data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'mb_internal_encoding'
          1        SEND_VAL                                                 'UTF-8'
          2        DO_ICALL                                                 
    3     3        INIT_FCALL                                               'mb_http_output'
          4        SEND_VAL                                                 'UTF-8'
          5        DO_ICALL                                                 
    6     6        ASSIGN                                                   !0, '%7B+%22Foo%22+%3A+%22Bar%22+%7D'
    8     7        INIT_FCALL                                               'mb_detect_encoding'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $6      
         10        CONCAT                                           ~7      $6, '%0D%0A'
         11        ECHO                                                     ~7
    9    12        INIT_FCALL                                               'var_dump'
         13        INIT_FCALL                                               'json_decode'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                         $8      
         16        SEND_VAR                                                 $8
         17        DO_ICALL                                                 
   11    18        INIT_FCALL                                               'utf8_encode'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                         $10     
         21        ASSIGN                                                   !2, $10
   13    22        INIT_FCALL                                               'mb_detect_encoding'
         23        SEND_VAR                                                 !2
         24        DO_ICALL                                         $12     
         25        CONCAT                                           ~13     $12, '%0D%0A'
         26        ECHO                                                     ~13
   14    27        INIT_FCALL                                               'var_dump'
         28        INIT_FCALL                                               'json_decode'
         29        SEND_VAR                                                 !2
         30        DO_ICALL                                         $14     
         31        SEND_VAR                                                 $14
         32        DO_ICALL                                                 
         33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.14 ms | 1396 KiB | 25 Q