Skip to content

Instantly share code, notes, and snippets.

View panvid's full-sized avatar
💻
Productive with coding

David Pauli panvid

💻
Productive with coding
View GitHub Profile
<?php
declare(strict_types=1);
namespace CoreTest;
use GuzzleHttp\Client;
use PHPUnit\Framework\TestCase;
/**
* Class AbstractApiTest
<?php
class Foo {
public $a = 1;
protected $b = 3;
private $c = 4;
}
$foo = new Foo;
do {
<?php
class A {
function __toString() {
return 'bar';
}
}
$bar = 42;
$foo = new A();
var_dump($$foo);
<?php
class A {
public $var = "blub";
function __toString() {
return $var;
}
}
function makeBlab($object) {
@panvid
panvid / caseAfterDefault.php
Last active April 18, 2017 10:16
Moments whenPHP sucks
<?php
switch ('superCoolValue') {
case 'bla':
echo "is bla";
break;
case 'blu':
case 'bli':
static int f() {
while (true) {
try {
return 1;
} finally {
break;
}
}
return 2;
}