Skip to content

Instantly share code, notes, and snippets.

View zulus's full-sized avatar

Dawid Pakuła zulus

View GitHub Profile
<?php
namespace Any\NS {
class MyClass {}
}
namespace My\NS {
use Any\NS\MyClass;
new MyClass();
}
namespace My\NS {
use Any\NS\MyClass; // in both namespaces is highlighted as unused, cmd+shift+o also remove it
@zulus
zulus / gist:c9e89446fb496475e112
Created June 30, 2015 13:50
Bug 459420 - [PHP5.6] Error displayed when using constant array
<?php
const foo = ["2"];
const item = foo[call()]; // incorrect like in php
const el = foo[2]; // incorrect, should be valid
class foo {
const item = foo[0]; // should be valid
}
@zulus
zulus / gist:cdcaad17a9c3645007a0
Created October 20, 2014 21:36
Import tests for bug 435922
<?php
namespace A {
/**
* My magic test class
*
* @return \DateTime
*/
function getdate() {
return 'what_ever';
}