3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo mb_detect_encoding(utf8_encode("The fuck!?")); mb_internal_encoding('UTF-8'); $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/Zv7iB
function name:  (null)
number of ops:  38
compiled vars:  !0 = $someFoo, !1 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'mb_detect_encoding'
          1        INIT_FCALL                                               'utf8_encode'
          2        SEND_VAL                                                 'The+fuck%21%3F'
          3        DO_ICALL                                         $2      
          4        SEND_VAR                                                 $2
          5        DO_ICALL                                         $3      
          6        ECHO                                                     $3
    5     7        INIT_FCALL                                               'mb_internal_encoding'
          8        SEND_VAL                                                 'UTF-8'
          9        DO_ICALL                                                 
    7    10        ASSIGN                                                   !0, '%7B+%22Foo%22+%3A+%22Bar%22+%7D'
    9    11        INIT_FCALL                                               'mb_detect_encoding'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $6      
         14        CONCAT                                           ~7      $6, '%0D%0A'
         15        ECHO                                                     ~7
   10    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                                                 
   12    22        INIT_FCALL                                               'utf8_encode'
         23        SEND_VAR                                                 !0
         24        DO_ICALL                                         $10     
         25        ASSIGN                                                   !1, $10
   13    26        INIT_FCALL                                               'mb_detect_encoding'
         27        SEND_VAR                                                 !1
         28        DO_ICALL                                         $12     
         29        CONCAT                                           ~13     $12, '%0D%0A'
         30        ECHO                                                     ~13
   14    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:
146.59 ms | 1396 KiB | 23 Q