Re: Here's a "crazy" idea....Interpreter Directives?
| From: | Gabor Hojtsy | Date: | Sat, 14 Aug 2004 11:35:18 +0000 |
| Subject: | Re: Here's a "crazy" idea....Interpreter Directives? | ||
| References: | 1 | Groups: | php.mirrors |
| Request: | Send a blank email to php-mirrors+get-25801@lists.php.net to get a copy of this message | ||
Please submit feature requests at bugs.php.net (as feature requests :)
Regards,
Gabor Hojtsy
Sina Iman írta:
Would it be possible to have, in future releases of PHP, "interpreter directives"? What I mean is like compiler direcives in C++, but in php it would just specify the version of php you want your script to be parsed by. For example: (the syntax is just an example of what it could be, and how cool it would look :) )<?php :: Global-Lang: PHP 4.3.8 // Globally parse the document as php 4.3.8$str = strlen("hello") :: Lang: PHP 5.1.0; // parse functions on this line as php 5.1.0 ?> And this would make a script that would normally be parsed as a php 5 script parsed as a php 4.3.8 script. This way developers could experiment with different function definitions from other versions of php to see if they work better/faster/differently A totally recompiled version of php encompassing older versions would be required, of course, and it probably would effect performance a bunch, but I think it would be really cool for developing and testing applications. This would be very interesting if possible to do, what do you guys think? Thanks, Sina