title: PHP webservice request and response
body: <p>I'm using <code>PHP 5.3</code>, and trying to develop a simple web service that gets some parameters with POST method and has a response.</p>
  
  <pre><code>function start(){
      getAndValidateParams();
  
      global $response;
      echo json_encode($response);
  }
  
  function getAndValidateParams(){
      // token (mandatory)
      if(isset($_POST[PARAM_TOKEN])){
          echo 'got your token';
      }else{
          $response[ERROR_CODE] = ERR2_INVALID_TOKEN;
          $response[DESCRIPTION] = CODE2_DESC;
      }
  }
  </code></pre>
  
  <p>I'm trying to test that with <a href="https://chrome.google.com/webstore/detail/postman-rest-client/fdmmgilgnpjigdojojpjoooidkmcomcm?hl=en" rel="nofollow noreferrer">Postman</a>:
  <img src="https://i.stack.imgur.com/Y1q7b.png" alt="enter image description here"></p>
  
  <p><strong>The problems:</strong><br/>
  1. About the Xdebug HTML I saw the following <a href="https://stackoverflow.com/questions/1465645/unreadable-var-dump-in-firebug-when-xdebug-is-enabled">question</a>, If I turn the var_dump off, will it disable usage of <code>var_dump()</code> inside my php code? (I want to be able use it for debugging but not seeing that in the response).</p>
  
  <p>2.Also I have a problem to pass the parameter 'token', I don't see it in <code>getAndValidateParams()</code>.</p>
  
  <p>Any help will be appreciated.</p>