title: OOPHP function no return in Firefox
body: <p>I have three files: <em>class.php, functions.js, interface.php</em></p>
  
  <p><em>class.php</em> is the oophp-file witch defines methods and attributes.</p>
  
  <p><em>interface.php</em> defines functions who uses the methods from the object of class.php</p>
  
  <p>The object is defined in the index.php and is stored in a session.</p>
  
  <p>With the functions.js I do POST-Calls (jQuery) on the interface.php.</p>
  
  <p>My Problem:</p>
  
  <p>A init()-function of interface.php is called with $.post in the functions.js
  The init()-function returns the return-value of the test()-function of the object of the class.php. </p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>the functions.js</p>
  
  <pre><code>$(document).ready(function() {
    init();
  });
  
  function init() {
    $.ajax({
      type: 'POST',
      url: 'interface.php',
      data: {f: 'init'},
      success: function(data) {alert(data);}
    });
  }
  </code></pre>
  
  <p>the interface.php:</p>
  
  <pre><code>&lt;?php
    require_once('class.php');
    session_start();
  
    if(isset($_REQUEST['f'])) {
      $func = $_REQUEST['f'];
      $func();
    }
  
    function init() {
      $obj = $_SESSION['object'];
      echo $obj-&gt;test();  // test() returns an array like array('test1', 'test2')
    }
  ?&gt;
  </code></pre>
  
  <p>Whatever test() returns, in firefox I get a empty alert(). It works in Chrome!
  You know the problem?</p>