3v4l.org

run code in 300+ PHP versions simultaneously
<?php ob_start(); //simulating a JSON output ?> { "date": { "epoch": "1412870400", "pretty": "07:00 PM IDT , אוקטובר 09, 2014", "day": 9, "month": 10, "year": 2014, "yday": 281, "hour": 19, "min": "00", "sec": 0, "isdst": "1", "monthname": "אוקטובר", "monthname_short": "אוק", "weekday_short": "חמישי", "weekday": "חמישי", "ampm": "PM", "tz_short": "IDT", "tz_long": "Asia/Jerusalem" }, "period": 1, "high": { "fahrenheit": "85", "celsius": "29" }, "low": { "fahrenheit": "68", "celsius": "20" }, "conditions": "בהיר", "icon": "clear", "icon_url": "http://icons.wxug.com/i/c/k/clear.gif", "skyicon": "", "pop": 0, "qpf_allday": { "in": 0, "mm": 0 }, "qpf_day": { "in": 0, "mm": 0 }, "qpf_night": { "in": 0, "mm": 0 }, "snow_allday": { "in": 0, "cm": 0 }, "snow_day": { "in": 0, "cm": 0 }, "snow_night": { "in": 0, "cm": 0 }, "maxwind": { "mph": 15, "kph": 24, "dir": "צ-מע", "degrees": 316 }, "avewind": { "mph": 11, "kph": 18, "dir": "צ-מע", "degrees": 316 }, "avehumidity": 52, "maxhumidity": 0, "minhumidity": 0 } <?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/avWsi
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                                                     '%7B%0A++++++++++++++++++++%22date%22%3A+%7B%0A++++++++++++++++++++++++%22epoch%22%3A+%221412870400%22%2C%0A++++++++++++++++++++++++%22pretty%22%3A+%2207%3A00+PM+IDT+%2C+%D7%90%D7%95%D7%A7%D7%98%D7%95%D7%91%D7%A8+09%2C+2014%22%2C%0A++++++++++++++++++++++++%22day%22%3A+9%2C%0A++++++++++++++++++++++++%22month%22%3A+10%2C%0A++++++++++++++++++++++++%22year%22%3A+2014%2C%0A++++++++++++++++++++++++%22yday%22%3A+281%2C%0A++++++++++++++++++++++++%22hour%22%3A+19%2C%0A++++++++++++++++++++++++%22min%22%3A+%2200%22%2C%0A++++++++++++++++++++++++%22sec%22%3A+0%2C%0A++++++++++++++++++++++++%22isdst%22%3A+%221%22%2C%0A++++++++++++++++++++++++%22monthname%22%3A+%22%D7%90%D7%95%D7%A7%D7%98%D7%95%D7%91%D7%A8%22%2C%0A++++++++++++++++++++++++%22monthname_short%22%3A+%22%D7%90%D7%95%D7%A7%22%2C%0A++++++++++++++++++++++++%22weekday_short%22%3A+%22%D7%97%D7%9E%D7%99%D7%A9%D7%99%22%2C%0A++++++++++++++++++++++++%22weekday%22%3A+%22%D7%97%D7%9E%D7%99%D7%A9%D7%99%22%2C%0A++++++++++++++++++++++++%22ampm%22%3A+%22PM%22%2C%0A++++++++++++++++++++++++%22tz_short%22%3A+%22IDT%22%2C%0A++++++++++++++++++++++++%22tz_long%22%3A+%22Asia%2FJerusalem%22%0A++++++++++++++++++++%7D%2C%0A++++++++++++++++++++%22period%22%3A+1%2C%0A++++++++++++++++++++%22high%22%3A+%7B%0A++++++++++++++++++++++++%22fahrenheit%22%3A+%2285%22%2C%0A++++++++++++++++++++++++%22celsius%22%3A+%2229%22%0A++++++++++++++++++++%7D%2C%0A++++++++++++++++++++%22low%22%3A+%7B%0A++++++++++++++++++++++++%22fahrenheit%22%3A+%2268%22%2C%0A++++++++++++++++++++++++%22celsius%22%3A+%2220%22%0A++++++++++++++++++++%7D%2C%0A++++++++++++++++++++%22conditions%22%3A+%22%D7%91%D7%94%D7%99%D7%A8%22%2C%0A++++++++++++++++++++%22icon%22%3A+%22clear%22%2C%0A++++++++++++++++++++%22icon_url%22%3A+%22http%3A%2F%2Ficons.wxug.com%2Fi%2Fc%2Fk%2Fclear.gif%22%2C%0A++++++++++++++++++++%22skyicon%22%3A+%22%22%2C%0A++++++++++++++++++++%22pop%22%3A+0%2C%0A++++++++++++++++++++%22qpf_allday%22%3A+%7B%0A++++++++++++++++++++++++%22in%22%3A+0%2C%0A++++++++++++++++++++++++%22mm%22%3A+0%0A++++++++++++++++++++%7D%2C%0A++++++++++++++++++++%22qpf_day%22%3A+%7B%0A++++++++++++++++++++++++%22in%22%3A+0%2C%0A++++++++++++++++++++++++%22mm%22%3A+0%0A++++++++++++++++++++%7D%2C%0A++++++++++++++++++++%22qpf_night%22%3A+%7B%0A++++++++++++++++++++++++%22in%22%3A+0%2C%0A++++++++++++++++++++++++%22mm%22%3A+0%0A++++++++++++++++++++%7D%2C%0A++++++++++++++++++++%22snow_allday%22%3A+%7B%0A++++++++++++++++++++++++%22in%22%3A+0%2C%0A++++++++++++++++++++++++%22cm%22%3A+0%0A++++++++++++++++++++%7D%2C%0A++++++++++++++++++++%22snow_day%22%3A+%7B%0A++++++++++++++++++++++++%22in%22%3A+0%2C%0A++++++++++++++++++++++++%22cm%22%3A+0%0A++++++++++++++++++++%7D%2C%0A++++++++++++++++++++%22snow_night%22%3A+%7B%0A++++++++++++++++++++++++%22in%22%3A+0%2C%0A++++++++++++++++++++++++%22cm%22%3A+0%0A++++++++++++++++++++%7D%2C%0A++++++++++++++++++++%22maxwind%22%3A+%7B%0A++++++++++++++++++++++++%22mph%22%3A+15%2C%0A++++++++++++++++++++++++%22kph%22%3A+24%2C%0A++++++++++++++++++++++++%22dir%22%3A+%22%D7%A6-%D7%9E%D7%A2%22%2C%0A++++++++++++++++++++++++%22degrees%22%3A+316%0A++++++++++++++++++++%7D%2C%0A++++++++++++++++++++%22avewind%22%3A+%7B%0A++++++++++++++++++++++++%22mph%22%3A+11%2C%0A++++++++++++++++++++++++%22kph%22%3A+18%2C%0A++++++++++++++++++++++++%22dir%22%3A+%22%D7%A6-%D7%9E%D7%A2%22%2C%0A++++++++++++++++++++++++%22degrees%22%3A+316%0A++++++++++++++++++++%7D%2C%0A++++++++++++++++++++%22avehumidity%22%3A+52%2C%0A++++++++++++++++++++%22maxhumidity%22%3A+0%2C%0A++++++++++++++++++++%22minhumidity%22%3A+0%0A++++++++++++++++%7D%0A'
   81     3        INIT_FCALL                                               'ob_get_contents'
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !0, $3
   82     6        INIT_FCALL                                               'ob_end_clean'
          7        DO_ICALL                                                 
   85     8        INIT_FCALL                                               'json_decode'
          9        SEND_VAR                                                 !0
         10        SEND_VAL                                                 <true>
         11        DO_ICALL                                         $6      
         12        ASSIGN                                                   !1, $6
   87    13        INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                                 
   90    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
   92    32    >   ECHO                                                     '+-+No+errors'
   93    33      > JMP                                                      ->46
   95    34    >   ECHO                                                     '+-+Maximum+stack+depth+exceeded'
   96    35      > JMP                                                      ->46
   98    36    >   ECHO                                                     '+-+Underflow+or+the+modes+mismatch'
   99    37      > JMP                                                      ->46
  101    38    >   ECHO                                                     '+-+Unexpected+control+character+found'
  102    39      > JMP                                                      ->46
  104    40    >   ECHO                                                     '+-+Syntax+error%2C+malformed+JSON'
  105    41      > JMP                                                      ->46
  107    42    >   ECHO                                                     '+-+Malformed+UTF-8+characters%2C+possibly+incorrectly+encoded'
  108    43      > JMP                                                      ->46
  110    44    >   ECHO                                                     '+-+Unknown+error'
  111    45      > JMP                                                      ->46
         46    >   FREE                                                     $9
  113    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
  114    53      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.95 ms | 1396 KiB | 27 Q