Skip to content

Instantly share code, notes, and snippets.

@kiltec
kiltec / introrx.md
Created August 26, 2016 13:06 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
<?php
class Url {
public $protocol = "";
public $domain = "";
public $path = "";
public function __construct($url_string){
$this->protocol = $this->_extractProtocol($url_string);
$this->domain = $this->_extractDomain($url_string);
<?php
class WordWrapTest extends PHPUnit_Framework_TestCase {
public function testDoNotWrapWhenNoText() {
$text = "";
$actual = word_wrap($text, 60);
$this->assertEquals("", $actual);
}
--- library/Zend/Db/Table/Abstract.php (revision 23831)
+++ library/Zend/Db/Table/Abstract.php (working copy)
@@ -410,6 +410,16 @@
}
/**
+ * @param string $rowClass
+ * @param array $data
+ * @return Zend_Db_Table_Row_Abstract
+ */
@kiltec
kiltec / gist:863789
Created March 10, 2011 08:59
Fix else-statements in C like languages
# This command converts:
# }
# else {
# echo $bleh;
# }
#
# to:
# } else {
# echo $bleh;
# }