1
0
Fork 0
php-language-server/fixtures/references.php

44 lines
866 B
PHP
Raw Permalink Normal View History

2016-10-08 12:59:08 +00:00
<?php
namespace TestNamespace;
$obj = new TestClass($a, $b, $c);
2016-10-08 12:59:08 +00:00
$obj->testMethod();
echo $obj->testProperty;
TestClass::staticTestMethod();
echo TestClass::$staticTestProperty;
echo TestClass::TEST_CLASS_CONST;
test_function();
$var = 123;
echo $var;
/**
* Aute duis elit reprehenderit tempor cillum proident anim laborum eu laboris reprehenderit ea incididunt.
*
* @param TestClass $param Adipisicing non non cillum sint incididunt cillum enim mollit.
* @return TestClass
*/
2016-10-08 12:59:08 +00:00
function whatever(TestClass $param): TestClass {
echo $param;
}
$fn = function() use ($var) {
echo $var;
};
echo TEST_CONST;
2016-10-26 09:47:02 +00:00
use function TestNamespace\test_function;
2016-10-26 18:56:02 +00:00
if ($abc instanceof TestInterface) {
}
// Nested expressions
$obj->testProperty->testMethod();
TestClass::$staticTestProperty[123]->testProperty;
$child = new ChildClass;
echo $child->testMethod();