Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
PHP6 gets a COMEFROM statement
Apr 01, 2006 @ 02:20:04

Harry Fuecks has posted a new item on the SitePoint PHP Blog today - a look at the "COMEFROM" statement that the next major version of PHP will have (PHP6).

One of the more controversial additions to PHP6 is the GOTO. Some have argued it flys in the face of many years good programming sense but there are valid use cases, when running performance critical operations such as parsing, where the overhead of making PHP user function calls becomes significant.

Anyway GOTO seems to have opened the gates to some more radical language modifications and recent discussion a revolved around adding a COMEFROM statement to PHP, which led to an initial patch being applied to the PHP6 CVS branch here.

The statement allows you to modify your code's behavior based on where it came from rather than just forwarding around bits of code from one place to the next. Harry gives a code example of how it can be used as well.

(Hint: think about this one...)

tagged: php6 comefrom statement goto discussion php6 comefrom statement goto discussion

Link:

SitePoint PHP Blog:
PHP6 gets a COMEFROM statement
Apr 01, 2006 @ 02:20:04

Harry Fuecks has posted a new item on the SitePoint PHP Blog today - a look at the "COMEFROM" statement that the next major version of PHP will have (PHP6).

One of the more controversial additions to PHP6 is the GOTO. Some have argued it flys in the face of many years good programming sense but there are valid use cases, when running performance critical operations such as parsing, where the overhead of making PHP user function calls becomes significant.

Anyway GOTO seems to have opened the gates to some more radical language modifications and recent discussion a revolved around adding a COMEFROM statement to PHP, which led to an initial patch being applied to the PHP6 CVS branch here.

The statement allows you to modify your code's behavior based on where it came from rather than just forwarding around bits of code from one place to the next. Harry gives a code example of how it can be used as well.

(Hint: think about this one...)

tagged: php6 comefrom statement goto discussion php6 comefrom statement goto discussion

Link:


Trending Topics: