Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P1232
constant.txt
Active
Public
Actions
Authored by
epriestley
on Aug 13 2014, 2:17 AM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Referenced Files
F189690: constant.txt
Aug 13 2014, 2:17 AM
2014-08-13 02:17:18 (UTC+0)
Subscribers
None
$ cat test.php
<?php
class C {
const K = 'duck';
public function m($v = self::K) {
echo $v."\n";
}
}
$o = new C();
$o->m();
$ php -f test.php
duck
Event Timeline
epriestley
edited the content of this paste.
(Show Details)
Aug 13 2014, 2:17 AM
2014-08-13 02:17:18 (UTC+0)
epriestley
changed the title of this paste from untitled to
constant.txt
.
epriestley
updated the paste's language from
autodetect
to
autodetect
.
Log In to Comment