Page MenuHomePhorge

self-member-references.lint-test
No OneTemporary

self-member-references.lint-test

<?php
class Foo extends Bar {
const FOOBAR = 'FOOBAR';
public function __construct() {
PARENT::__construct(null);
}
public function bar() {
echo self::FOOBAR;
echo Self :: FOOBAR;
}
public function baz() {
echo static::FOOBAR;
echo Foo::FOOBAR;
}
}
~~~~~~~~~~
error:3:7
advice:7:5
advice:12:10
advice:12:14
advice:12:17
advice:17:10
~~~~~~~~~~
<?php
class Foo extends Bar {
const FOOBAR = 'FOOBAR';
public function __construct() {
parent::__construct(null);
}
public function bar() {
echo self::FOOBAR;
echo self::FOOBAR;
}
public function baz() {
echo static::FOOBAR;
echo self::FOOBAR;
}
}

File Metadata

Mime Type
text/x-php
Expires
Wed, Mar 26, 23:50 (1 d, 19 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1212035
Default Alt Text
self-member-references.lint-test (668 B)

Event Timeline