Doc #66587 [Com]: __DIR__ and other magic constants show trait data in trait

From: Date: Sat, 01 Feb 2014 15:52:53 +0000
Subject: Doc #66587 [Com]: __DIR__ and other magic constants show trait data in trait
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-10932@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=66587&edit=1 ID: 66587 Comment by: wim at wimgodden dot be Reported by: wim at wimgodden dot be Summary: __DIR__ and other magic constants show trait data in trait Status: Not a bug Type: Documentation Problem Package: Documentation problem Operating System: Any PHP Version: Irrelevant Block user comment: N Private report: N New Comment: I agree that this they are compiler constants, but most developers don't have a clue. I'm not asking to change the implementation, only to specify this in the docs, so it's clear for anyone who's not aware of the fact that these constants are replaced at compile time, not at run-time. Previous Comments: ------------------------------------------------------------------------ [2014-02-01 09:02:43] krakjoe@php.net I'm not sure why you would expect anything different, they are compiler constants, I'm convinced it doesn't need mentioning because it's obvious so closing the bug. ------------------------------------------------------------------------ [2014-01-27 15:24:57] wim at wimgodden dot be Description: ------------ --- From manual page: http://www.php.net/language.constants.predefined --- It might be useful to add information detailing that __DIR__ and __FILE__ and __LINE__ will show the directory, file and line number of the code in the trait definition file, not the location where the trait is being used. It is counterintuitive for non-core developers, so it's best to mention this in de docs. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=66587&edit=1

« previous php.doc.bugs (#10932) next »