note 118918 added to language.oop5.static

From: Date: Sat, 27 Feb 2016 21:06:33 +0000
Subject: note 118918 added to language.oop5.static
Groups: php.notes 
Request: Send a blank email to php-notes+get-205058@lists.php.net to get a copy of this message
<?php trait t { protected $p; public function testMe() {echo 'static:'.static::class. ' // self:'.self::class ."\n";} } class a { use t; } class b extends a {} echo (new a)->testMe(); echo (new b)->testMe(); outputs static:a // self:t static:b // self:t ---- Server IP: 72.52.91.14 Probable Submitter: 67.187.127.133 ---- Manual Page -- http://php.net/manual/en/language.oop5.static.php Edit -- https://master.php.net/note/edit/118918 Del: integrated -- https://master.php.net/note/delete/118918/integrated Del: useless -- https://master.php.net/note/delete/118918/useless Del: bad code -- https://master.php.net/note/delete/118918/bad+code Del: spam -- https://master.php.net/note/delete/118918/spam Del: non-english -- https://master.php.net/note/delete/118918/non-english Del: in docs -- https://master.php.net/note/delete/118918/in+docs Del: other reasons-- https://master.php.net/note/delete/118918 Reject -- https://master.php.net/note/reject/118918 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#205058) next »