Skip to content

Instantly share code, notes, and snippets.

@sasezaki
Created June 6, 2012 11:10
Show Gist options
  • Select an option

  • Save sasezaki/2881304 to your computer and use it in GitHub Desktop.

Select an option

Save sasezaki/2881304 to your computer and use it in GitHub Desktop.
PHP testing header*
<?php
/**
* server
* $php -S localhost:8080 server.php
*/
use Zend\Http\PhpEnvironment\Response;
use Zend\Http\Header\ContentType;
include 'tests/_autoload.php';
class ForTest extends ContentType
{
protected $value = 'text/html';
}
$response = new Response;
$response->headers()->addHeader(new ForTest);
$response->setContent('');
echo $response;
//if (isset($_GET['die']) && $_GET['die']) {
posix_kill(posix_getpid(), 9);
//}
/**
* client
*/
//file_get_contents('http://localhost:8080/');
//global $http_response_header
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment