* Version: 1.0
* Date: 2012-09-18
* Author: Pádraic <padraic.brady.at.gmail.com>
* Status: Under Discussion
* First Published at: http://wiki.php.net/rfc/escaper
| <?php | |
| ini_set('display_errors', 1); | |
| /** | |
| * This script check how PHP makes HTTPS (SSL/TLS) requests using PHP Streams | |
| * or cURL. Configuration options are passed as GET parameters, for example: | |
| * http://localhost/checksslcontext.php?reconfigure=1 | |
| * | |
| * Configuration: | |
| * http://localhost/checksslcontext.php | |
| * Basic PHP Streams using file_get_contents(). Default settings. |
| <?php | |
| require_once 'Zend/Feed/Writer/Feed.php'; | |
| /** | |
| * Create the parent feed | |
| */ | |
| $feed = new Zend_Feed_Writer_Feed; | |
| $feed->setTitle('Paddy\'s Podcast'); |
| <?php | |
| require_once 'Zend/Http/Client.php'; | |
| $bclient = new Zend_Http_Client(array('keepalive'=>true)); | |
| $bclient->setUri('http://bit.ly'); | |
| echo $bclient->request()->getBody(); |
| <?php | |
| /** | |
| * This script is designed as a simple tool to run comparisons between varying | |
| * cipher suite lists used by PHP 5.5, cURL and Mozilla. The ciphersuites are | |
| * are hardcoded and date to 01 February 2014 | |
| * | |
| * The differences are restrictions, e.g. Mozilla diff from DEFAULT shows ciphers | |
| * Mozilla has removed, etc. The differences should all be SSLv3 related. | |
| */ |
* Version: 1.0
* Date: 2012-09-18
* Author: Pádraic <padraic.brady.at.gmail.com>
* Status: Under Discussion
* First Published at: http://wiki.php.net/rfc/escaper
| <?php | |
| mt_srand(1361152757.2); | |
| for ($i=1; $i < 25; $i++) { | |
| echo mt_rand(), PHP_EOL; | |
| } |
| <?php | |
| $dom = new DOMDocument; | |
| $dom->loadXML($xml); | |
| foreach ($dom->childNodes as $child) { | |
| if ($child->nodeType === XML_DOCUMENT_TYPE_NODE) { | |
| throw new \InvalidArgumentException( | |
| 'Invalid XML: Detected use of illegal DOCTYPE' | |
| ); | |
| } |
| The following tasks need to be done to finish the i18n component: | |
| ------------------------------------------------------------------------------ | |
| To finish translator: | |
| - Add Xliff translation loader with plural support if possible, see: | |
| https://wiki.oasis-open.org/xliff/XLIFF2.0/Feature/Plural%20Entries | |
| - Add Tmx translation loader (identify if plural support is available) | |
| - Complete unit tests | |
| ------------------------------------------------------------------------------ |
| <?php | |
| $package = function ($s) { | |
| $s->name = 'Overlord'; | |
| $s->authors = 'Padraic Brady, Sauron[sauron@mordor.me]'; | |
| $s->version = '0.0.1-dev'; | |
| $s->api_version = '0.0.1-dev'; | |
| $s->summary = 'Monitoring library for Hobbit Detector 1.0'; | |
| $s->description = file_get_contents(__DIR__ . '/description.txt'); | |
| $s->homepage = 'http://en.wikipedia.org/wiki/Sauron'; |
| public function testMockedMethodsCallableFromWithinOriginalClass() | |
| { | |
| $mock = $this->container->mock('MockeryTest_InterMethod1[doThird]'); | |
| $mock->shouldReceive('doThird')->andReturn(true); | |
| $this->assertTrue($mock->doFirst()); | |
| } |