This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class ArrayFilterInput implements \ArrayAccess | |
| { | |
| protected $input; | |
| protected $cache = array(); | |
| public function __construct($input) | |
| { | |
| $this->input = $input; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $example = <<<EOS | |
| This is the title, a free-form text | |
| that can have as many lines | |
| of text as I wish. | |
| Play Wikipedia as jm | |
| Spec main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| include 'Benchmark.php'; // https://github.com/BruceJillis/Benchmark | |
| class Author { | |
| public $firstName; | |
| protected $lastName; | |
| public function __construct($firstName, $lastName) { | |
| $this->firstName = $firstName; | |
| $this->lastName = $lastName; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $tests = array( | |
| array(195, 169), // é | |
| array(227, 130, 171), // カ | |
| array(208, 150), // Ж | |
| ); | |
| function unichr($inte) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class Request { | |
| const METHOD_GET = 'GET'; | |
| const METHOD_POST = 'POST'; | |
| const METHOD_HEAD = 'HEAD'; | |
| private $method; | |
| private $uri; | |
| private $headers; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class NamedTuple { | |
| public static $__instances = array(); | |
| private $uuid; | |
| private $values = array(); | |
| public function __construct() { | |
| $found = false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // This was the first test to create what then became Traba. | |
| // | |
| // https://github.com/guide42/traba | |
| // | |
| $request = array( | |
| 'path_info' => '/user/123/edit', | |
| 'query' => array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class Configurator implements ArrayAccess { | |
| const PHASE_DEFAULT = 0; | |
| private $config = []; | |
| private $defaults = []; | |
| private $queue; | |
| private $hooks; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function send(Response $response) { | |
| if (headers_sent()) { | |
| return; | |
| } | |
| http_response_code($response->status); | |
| foreach ($response->headers as $key => $value) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| interface LoaderInterface { | |
| function load($resource); | |
| function supports($resource); | |
| } | |
| abstract class Loader implements LoaderInterface { | |
| private $delegate; | |
| private $loading = []; |