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
/** | |
* Dumps information about a variable. Convenience wrapper for var_dump() | |
* | |
* @param mixed $expression The variable you want to dump. | |
* @param mixed $expression,... unlimited OPTIONAL number of additional variables to display with d() | |
* @return void | |
*/ | |
function d($expression) { | |
var_dump($expression); | |
} |
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 multiple_cycle($limit, $numbers) | |
{ | |
$count = 0; | |
$index = 0; | |
$numbersLength = count($numbers); | |
for ($i = 1; $i <= $limit; $i++) { | |
if ($i % $numbers[$index] == 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
$this->addElement('text', 'email', array( | |
'label' => 'Your email address', | |
'required' => true, | |
'validators' => array( | |
array('EmailAddress'), | |
array( | |
new \Zend_Validate_Db_NoRecordExists(array('table' => 'accounts', 'field' => 'email')), | |
'breakChainOnFailure' => true | |
), | |
array(new \Zend_Validate_Db_NoRecordExists(array('table' => 'beta_invites', 'field' => 'email'))) |
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 | |
namespace MercyfulFate; | |
use MercyfulFate\KingDiamond; | |
class KingDiamondTest extends \PHPUnit_Framework_TestCase | |
{ | |
/** | |
* @var MercyfulFate\Priest | |
*/ |
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 | |
echo "Hello world"; |
NewerOlder