<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.json.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'function.json-last-error-msg.php',
    1 => 'json_last_error_msg',
    2 => 'Returns the error string of the last json_validate(), json_encode() or json_decode() call',
  ),
  'up' => 
  array (
    0 => 'ref.json.php',
    1 => 'JSON Functions',
  ),
  'prev' => 
  array (
    0 => 'function.json-last-error.php',
    1 => 'json_last_error',
  ),
  'next' => 
  array (
    0 => 'function.json-validate.php',
    1 => 'json_validate',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/json/functions/json-last-error-msg.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.json-last-error-msg" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">json_last_error_msg</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.5.0, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">json_last_error_msg</span> &mdash; <span class="dc-title">Returns the error string of the last json_validate(), json_encode() or json_decode() call</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.json-last-error-msg-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>json_last_error_msg</strong></span>(): <span class="type"><a href="language.types.string.php" class="type string">string</a></span></div>

  <p class="para rdfs-comment">
   Returns the error string of the last <span class="function"><a href="function.json-validate.php" class="function">json_validate()</a></span>, <span class="function"><a href="function.json-encode.php" class="function">json_encode()</a></span> or <span class="function"><a href="function.json-decode.php" class="function">json_decode()</a></span>
   call, which did not specify <strong><code><a href="json.constants.php#constant.json-throw-on-error">JSON_THROW_ON_ERROR</a></code></strong>.
  </p>

 </div>


 <div class="refsect1 parameters" id="refsect1-function.json-last-error-msg-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">This function has no parameters.</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.json-last-error-msg-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns the error message on success, or <code class="literal">&quot;No error&quot;</code> if no
   error has occurred.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.json-last-error-msg-seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.json-last-error.php" class="function" rel="rdfs-seeAlso">json_last_error()</a> - Returns the last error occurred</span></li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>