This file contains 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 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 |
This file contains 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 | |
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 | |
} |
This file contains 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 A { | |
/** | |
* My magic test class | |
* | |
* @return \DateTime | |
*/ | |
function getdate() { | |
return 'what_ever'; | |
} |