3v4l.org

run code in 300+ PHP versions simultaneously
<?php ob_start(); //simulating a JSON output ?> }'; <?php $sJSONBuffer = ob_get_contents(); ob_end_clean(); //$sJSONBuffer = utf8_encode($sJSONBuffer); $aJSONStruct = json_decode($sJSONBuffer, true); var_dump($aJSONStruct); //print($sJSONBuffer); //echo 'errore '.json_last_error().''."\n"; switch (json_last_error()) { case JSON_ERROR_NONE: echo ' - No errors'; break; case JSON_ERROR_DEPTH: echo ' - Maximum stack depth exceeded'; break; case JSON_ERROR_STATE_MISMATCH: echo ' - Underflow or the modes mismatch'; break; case JSON_ERROR_CTRL_CHAR: echo ' - Unexpected control character found'; break; case JSON_ERROR_SYNTAX: echo ' - Syntax error, malformed JSON'; break; case JSON_ERROR_UTF8: echo ' - Malformed UTF-8 characters, possibly incorrectly encoded'; break; default: echo ' - Unknown error'; break; } echo 'errore '.json_last_error_msg().''."\n"; ?>
Finding entry points
Branch analysis from position: 0
8 jumps found. (Code = 187) Position 1 = 32, Position 2 = 34, Position 3 = 36, Position 4 = 38, Position 5 = 40, Position 6 = 42, Position 7 = 44, Position 8 = 19
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 46
Branch analysis from position: 46
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
1 jumps found. (Code = 42) Position 1 = 46
Branch analysis from position: 46
Branch analysis from position: 36
1 jumps found. (Code = 42) Position 1 = 46
Branch analysis from position: 46
Branch analysis from position: 38
1 jumps found. (Code = 42) Position 1 = 46
Branch analysis from position: 46
Branch analysis from position: 40
1 jumps found. (Code = 42) Position 1 = 46
Branch analysis from position: 46
Branch analysis from position: 42
1 jumps found. (Code = 42) Position 1 = 46
Branch analysis from position: 46
Branch analysis from position: 44
1 jumps found. (Code = 42) Position 1 = 46
Branch analysis from position: 46
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 32
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 34
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 36
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 38
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 40
Branch analysis from position: 29
2 jumps found. (Code = 44) Position 1 = 31, Position 2 = 42
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 44
Branch analysis from position: 44
Branch analysis from position: 42
Branch analysis from position: 40
Branch analysis from position: 38
Branch analysis from position: 36
Branch analysis from position: 34
Branch analysis from position: 32
filename:       /in/gaOTv
function name:  (null)
number of ops:  54
compiled vars:  !0 = $sJSONBuffer, !1 = $aJSONStruct
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'ob_start'
          1        DO_ICALL                                                 
    6     2        ECHO                                                     '%7D%27%3B%0A'
    8     3        INIT_FCALL                                               'ob_get_contents'
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !0, $3
    9     6        INIT_FCALL                                               'ob_end_clean'
          7        DO_ICALL                                                 
   12     8        INIT_FCALL                                               'json_decode'
          9        SEND_VAR                                                 !0
         10        SEND_VAL                                                 <true>
         11        DO_ICALL                                         $6      
         12        ASSIGN                                                   !1, $6
   14    13        INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                                 
   17    16        INIT_FCALL                                               'json_last_error'
         17        DO_ICALL                                         $9      
         18      > SWITCH_LONG                                              $9, [ 0:->32, 1:->34, 2:->36, 3:->38, 4:->40, 5:->42, ], ->44
         19    >   CASE                                                     $9, 0
         20      > JMPNZ                                                    ~10, ->32
         21    >   CASE                                                     $9, 1
         22      > JMPNZ                                                    ~10, ->34
         23    >   CASE                                                     $9, 2
         24      > JMPNZ                                                    ~10, ->36
         25    >   CASE                                                     $9, 3
         26      > JMPNZ                                                    ~10, ->38
         27    >   CASE                                                     $9, 4
         28      > JMPNZ                                                    ~10, ->40
         29    >   CASE                                                     $9, 5
         30      > JMPNZ                                                    ~10, ->42
         31    > > JMP                                                      ->44
   19    32    >   ECHO                                                     '+-+No+errors'
   20    33      > JMP                                                      ->46
   22    34    >   ECHO                                                     '+-+Maximum+stack+depth+exceeded'
   23    35      > JMP                                                      ->46
   25    36    >   ECHO                                                     '+-+Underflow+or+the+modes+mismatch'
   26    37      > JMP                                                      ->46
   28    38    >   ECHO                                                     '+-+Unexpected+control+character+found'
   29    39      > JMP                                                      ->46
   31    40    >   ECHO                                                     '+-+Syntax+error%2C+malformed+JSON'
   32    41      > JMP                                                      ->46
   34    42    >   ECHO                                                     '+-+Malformed+UTF-8+characters%2C+possibly+incorrectly+encoded'
   35    43      > JMP                                                      ->46
   37    44    >   ECHO                                                     '+-+Unknown+error'
   38    45      > JMP                                                      ->46
         46    >   FREE                                                     $9
   40    47        INIT_FCALL                                               'json_last_error_msg'
         48        DO_ICALL                                         $11     
         49        CONCAT                                           ~12     'errore+', $11
         50        CONCAT                                           ~13     ~12, ''
         51        CONCAT                                           ~14     ~13, '%0A'
         52        ECHO                                                     ~14
   41    53      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.38 ms | 1400 KiB | 27 Q