3v4l.org

run code in 300+ PHP versions simultaneously
<?php mb_internal_encoding('UTF-8'); echo mb_detect_encoding(utf8_encode("The fuck!?")); $someFoo = '{ "Foo" : "Bar" }'; echo mb_detect_encoding($someFoo) . "\r\n"; var_dump(json_decode($someFoo)); $data = utf8_encode($someFoo); echo mb_detect_encoding($data) . "\r\n"; var_dump(json_decode($data));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mNtE9
function name:  (null)
number of ops:  38
compiled vars:  !0 = $someFoo, !1 = $data
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_detect_encoding'
          4        INIT_FCALL                                               'utf8_encode'
          5        SEND_VAL                                                 'The+fuck%21%3F'
          6        DO_ICALL                                         $3      
          7        SEND_VAR                                                 $3
          8        DO_ICALL                                         $4      
          9        ECHO                                                     $4
    6    10        ASSIGN                                                   !0, '%7B+%22Foo%22+%3A+%22Bar%22+%7D'
    8    11        INIT_FCALL                                               'mb_detect_encoding'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $6      
         14        CONCAT                                           ~7      $6, '%0D%0A'
         15        ECHO                                                     ~7
    9    16        INIT_FCALL                                               'var_dump'
         17        INIT_FCALL                                               'json_decode'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                         $8      
         20        SEND_VAR                                                 $8
         21        DO_ICALL                                                 
   11    22        INIT_FCALL                                               'utf8_encode'
         23        SEND_VAR                                                 !0
         24        DO_ICALL                                         $10     
         25        ASSIGN                                                   !1, $10
   12    26        INIT_FCALL                                               'mb_detect_encoding'
         27        SEND_VAR                                                 !1
         28        DO_ICALL                                         $12     
         29        CONCAT                                           ~13     $12, '%0D%0A'
         30        ECHO                                                     ~13
   13    31        INIT_FCALL                                               'var_dump'
         32        INIT_FCALL                                               'json_decode'
         33        SEND_VAR                                                 !1
         34        DO_ICALL                                         $14     
         35        SEND_VAR                                                 $14
         36        DO_ICALL                                                 
         37      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.32 ms | 1396 KiB | 23 Q