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 | |
$array = function() { | |
$elements = func_get_args(); | |
$result = fn(function($i) use ($elements) { | |
return $elements[$i]; | |
}); | |
$result->len = function() use ($elements) { |
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 | |
// Define the 'class' class | |
$class = Obj() | |
->fn('new', function ($class) { | |
$newClass = Obj($class->methods) | |
->fn('new', function($class) { | |
$obj = Obj($class->imethods); | |
$args = func_get_args(); | |
array_shift($args); |
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
/* | |
Form Elements | |
-- Styled to look like native Safari on OS X. | |
-- Drop-down <select> menus are unaffected. | |
-- Buttons are unaffected. Native OS style. | |
*/ | |
::-webkit-input-placeholder { | |
color: #000; | |
} |
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 | |
$english = arr( | |
strr('Hello X'), | |
strr('Goodbye X') | |
); | |
$pirate = $english | |
->replace('/Hello/', 'Avast') | |
->replace('/Goodbye/', 'Was good te see ye') |
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 DomainObject | |
{ | |
public function __construct($arr = array()) | |
{ | |
foreach($arr as $key => $value) | |
$this->$key = $value; | |
$this->_attributes = new Attributes(); |