title: "Use of undefined constant success - assumed 'success'" error parsing json response
body: <p>im using google recaptcha and the way of my validation is through ajax, everything is working, I got a response</p>
  
  <pre><code>{
  success: "false/true"
  }
  </code></pre>
  
  <p>but i got an error saying "Use of undefined constant success - assumed 'success" on line 30, any ideas, help, suggestions, recommendations?</p>
  
  <p>this is my code on the controller (the one i use in communicating the google recaptcha API)</p>
  
  <pre><code>$captcha=$request-&gt;input('g-recaptcha-response');
  $response=file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=mysitekey&amp;response=".$captcha."&amp;remoteip=".$_SERVER['REMOTE_ADDR']);
  if($response.success == false) //this is the line 30
  {
      return 'You are spammer ! Get the out';
  }else{
      return 'Thanks for posting comment.';
  }
  </code></pre>
  
  <p>this is the line 30 "$response.success == false"</p>