php-sugar 0.70

0 views
Skip to first unread message

Sean Middleditch

unread,
Aug 18, 2007, 9:14:33 PM8/18/07
to PHP-Sugar Discussion
I've released PHP-Sugar 0.70.

Most of the changes are internal code cleanups, but a number of new
features have landed as well. Example include the new array
constructor syntax, e.g.

<% foreach $model in ['Ford', 'GM', 'Toyota'] %>

Also included are a new while loop, a senseful change to the range
loop syntax, a nocache directive, comment markers, and a few bug
fixes.

The standard library has also grown quite a bit, with a number of
generally useful functions web form authors might find useful. Two of
my favorite are the checked and selected functions, which let you turn
this:

<option value="test" <% if $value == 'test' %> selected="selected" <
% end %> >Test</option>

into:

<option value="test" <% selected $value == 'test' %> > Test </
option>

Also, I've already begun work on the next version. The only change to
be aware of for the next release is that the conversion of names to
strings is being removed. That means that code like this:

<% include header %>

must now be:

<% include "header" %>

A name is only used for function names, function parameter names, and
array/object indexes.

Reply all
Reply to author
Forward
0 new messages