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 Numberset | |
{ | |
public function __construct($min, $max, $numbers = null) | |
{ | |
$this->min = $min; | |
$this->max = $max; | |
// shhhh, don't tell anyone |
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 Numberset | |
{ | |
// class definition | |
public function odd() | |
{ | |
$this->numbers = array_filter($this->numbers, function ($number) { | |
return $number % 2; |
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 Numberset | |
{ | |
protected $min; | |
protected $max; | |
protected $numbers; | |
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 Aggregator | |
{ | |
protected $data = null; | |
public static function create() | |
{ | |
$instance = new static; | |
$instance->load(); |
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 Employee | |
{ | |
protected $salary; | |
public function __construct($salary) | |
{ | |
$this->salary = $salary; | |
} |
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
Inheriting a legacy application can be a very intimidating position to find yourself in. Being constantly | |
haunted by the decisions of the "Original Developer" can lead any rational person to the conclusion that a | |
ground up rewrite is the only way out. But rewrites are anything but rational, they're the wrong decision | |
almost every time so why take the risk? | |
This talk will offer attendees a practical approach to incrementally integrating the various Illuminate packages | |
from the Laravel Framework into virtually any legacy application all the while keeping it live and in production. | |
Learn to take that hostile, embarrassing application from a mess of functions, SQL injections and global state to | |
something you can actually be proud of. |
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
$matches->filter(function ($matchResult) use ($hashes) { | |
$matchResult->remove($hashes); | |
return $matchResult->isEmpty(); | |
}); |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCkJUAJ27UM6L8mhVCw8//O+DGk0D4MdmoAqJFxFcQYla8oF66hlJqoeTyZNnt7z0If+4f0POAoGJczppKZvzBQ+yUbh1YzYhTpS1XpYpig64hDi6R11+xf8spWgwZJc2IbgLNzSsrJk4khHzLmftIOV9OpeQblkWMf0H7WyP/e4xZNm2iaoHopIVgJwv1XWF8FOChP7b6y2ZdsEWnUkuTsW61uPdvAubOw/g3/C+nLrUg79CW+pwyjnBrATEWzjPdtADjjiID5EVKB7KuKXXk/eYGNUx9UO9AzxVTzP7oIkONmBCebEPA+ZOQIcqfspTYLHJN6omYHdAf4rDUKfsHl [email protected] |
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 array_is_subset($superset, $subset) | |
{ | |
if (count($superset) < count($subset)) { | |
return false; | |
} | |
$candidates = $superset; | |
$found = 0; |
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
1. Objects in PHP have methods which are referred to as 'magic methods'. Name these methods and | |
describe thier individual functions. | |
2. PHP Objects support single inheritance, what keyword is used to define the inheritance | |
relationship and describe some key effects inheritance has. | |
3. PHP objects support property and method visibility. What are the keywords used to describe | |
visibility and describe how each keyword affects the property or method. | |
4. What is a Trait in PHP? What effect does a Trait have on a PHP class that uses it? |