note 90135 added to language.namespaces
| From: | rudie-de-hotblocks at osu1 dot php dot net | Date: | Tue, 07 Apr 2009 19:14:39 +0000 |
| Subject: | note 90135 added to language.namespaces | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-152921@lists.php.net to get a copy of this message | ||
In response to [thomas dot worm at gsp-software dot de]:
There is a way, like there always has been, but it's always been nasty and you should avoid it
at all cost: eval.
The following will not provoke a syntax error, but you should avoid it:
<?php
if ( (float)phpversion() >= 5.3 ) {
eval("namespace MySpaceSubSpace;");
}
?>
You should develop and implement your software separate from version changes though. Let a 5.2
program run on a 5.2 server and a 5.3 program on a 5.3 server.
You can even have two versions of PHP running.
----
Server IP: 213.249.64.162
Probable Submitter: 82.95.221.110
----
Manual Page -- http://www.php.net/manual/en/language.namespaces.php
Edit -- https://master.php.net/note/edit/90135
Del: integrated -- https://master.php.net/note/delete/90135/integrated
Del: useless -- https://master.php.net/note/delete/90135/useless
Del: bad code -- https://master.php.net/note/delete/90135/bad+code
Del: spam -- https://master.php.net/note/delete/90135/spam
Del: non-english -- https://master.php.net/note/delete/90135/non-english
Del: in docs -- https://master.php.net/note/delete/90135/in+docs
Del: other reasons-- https://master.php.net/note/delete/90135
Reject -- https://master.php.net/note/reject/90135
Search -- https://master.php.net/manage/user-notes.php