curl -s http://php-osx.liip.ch/install.sh | bash -s 7.x
This file contains 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 MyClass { | |
public function __toString() { | |
try { | |
return $this->render(); | |
} catch(Exception $e) { | |
// the __toString method isn't allowed to throw exceptions | |
// so we turn them into an error instead | |
trigger_error($e->getMessage() . "\n" . $e->getTraceAsString(), E_USER_ERROR); |
This file contains 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
<alps version="1.0"> | |
<descriptor id="error" type="semantic"> | |
<doc>Error Message</doc> | |
<descriptor id="message" type="semantic"> | |
<doc> | |
For expressing a human readable message related to the current error which may be displayed to the user of the api | |
</doc> | |
</descriptor> |
This file contains 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 | |
use Aura\Sql\ExtendedPdoInterface; | |
use BEAR\Package\AppInjector; | |
use Koriym\QueryLocator\QueryLocatorInterface; | |
use PHPUnit\Framework\TestCase; | |
use Ray\Di\InjectorInterface; | |
use Ray\Query\RowInterface; | |
/** |
wiki https://github.com/koriym/BEAR.Sunday/wiki に移動しました
This file contains 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
/* | |
who does it better? | |
*/ | |
// this | |
{ | |
"rel" : "http://example.org/vocabularies/customer-communiations#customers/update-name-and-sms" | |
"href" : "http://example.org/customers/123" | |
"type" : "..." | |
} |
This file contains 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 | |
// iterator impl: | |
class MapIterator extends IteratorIterator { | |
private $f; | |
public function __construct($f, $inner) { | |
parent::__construct($inner); | |
$this->f = $f; |
31 Aug 2011
私は人々にGitを教えるためにあちこちを飛び回っているが、最近のほぼすべてのクラスやワークショップでgit-flowについてどう思うかを尋ねられた。私はいつも、git-flowは素晴らしいと思うと答えている。何百万ものワークフローを持ったシステム(Git)を提供し、ドキュメントもあるし、よくテストされている。フレキシブルなワークフローは、実に容易なやり方で多くの開発者の役に立つ。標準的なものになりつつあり、開発者はプロジェクトや企業の間を移動しつつこの標準的なワークフローに馴染むことができる。
This file contains 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
Array functions: | |
array_search $needle, $haystack | |
in_array $needle, $haystack | |
String functions: | |
strchr $haystack, $needle | |
stripos $haystack, $needle | |
stristr $haystack, $needle | |
strpos $haystack, $needle | |
strrchr $haystack, $needle |