title: PHP json_encode encode a function
body: <p>How to encode a Javascript function in PHP? I want to encode the callback function with array</p>
  <pre><code>$options = array(
  'title' =&gt; 'Title',
  'fnCallback' =&gt; someCallback);
  </code></pre>
  <p>equivalent ini Javascript:</p>
  <pre><code>var options = {
  'title': 'Title',
  'fnCallback': someCallback };
  </code></pre>
  <p>I know my PHP code is wrong, how can I fix it?</p>