Skip to content

Instantly share code, notes, and snippets.

Raúl Araya nubeiro

Block or report user

Report or block nubeiro

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View timeVsDateTimeTest.php
<?php
class timeVsDateTimeTest extends PHPUnit_Framework_TestCase
{
public function testTimeVsDateTime()
{
$timeZone = "Europe/Madrid";
ini_set('date.timezone', $timeZone); // otherwise next assertion won't pass.
date_default_timezone_set($timeZone);
$maybeUtc = time();
@nubeiro
nubeiro / typehinted.php
Created Feb 12, 2016
Testing type hints
View typehinted.php
<?php
class AMQPReader{
public function read_table() {
echo "do something";
}
}
class BaseProtocol
{
@nubeiro
nubeiro / testWeakTypesChecks.php
Created Nov 6, 2015
Testing default scalar type hints.
View testWeakTypesChecks.php
<?php
function concatStrings(string $a, string $b) {
return $a . ' - ' . $b;
}
function sum(int $a, int $b) {
return $a + $b;
}
You can’t perform that action at this time.