[PHPTAL] Object causing a parse error

Marco Pivetta ocramius at gmail.com
Mon Aug 1 20:53:35 CEST 2011


Just to synthesize :)

<p>Last login ${php: $time.timeFromNow($item.getCreated())}</p>

becomes

<p>Last login ${php: time.timeFromNow(item.getCreated())}</p>



Marco Pivetta
http://twitter.com/Ocramius
http://marco-pivetta.com



On 1 August 2011 19:35, Darrell Hamilton <darrellh at 4over.com> wrote:

> Robert,
>
> Per the PHPTAL documentation, when using the `php:' modifier, -> is
> replaced with a `.'
>
> Also, it would appear that there is a missing "not" in the
> documentation for the `php:' modifier:
>
> (again, from: http://phptal.org/manual/en/#tales-php )
>
> This expression evaluates what follows as a regular PHP expression
> except that '->' is replaced by dots '.' and variable names are
> __NOT__ prefixed with a dollar '$' sign.
>
> Darrell Hamilton,
> Software Developer,
> 4over, Inc
> darrellh at 4over.com
> 818-246-1170 ext. 285
>
>
>
> On Mon, Aug 1, 2011 at 10:26 AM,  <Robert_E_Lee at dell.com> wrote:
> > Try using valid PHP (->, not . for instance member access).
> >
> > -----Original Message-----
> > From: phptal-bounces at lists.motion-twin.com [mailto:
> phptal-bounces at lists.motion-twin.com] On Behalf Of Darrell Hamilton
> > Sent: Monday, August 01, 2011 12:20 PM
> > To: Template Attribute Language for PHP
> > Subject: Re: [PHPTAL] Object causing a parse error
> >
> > Fairly sure you just need to drop the `$'
> >
> > See: http://phptal.org/manual/en/#tales-php
> >
> > Darrell Hamilton,
> > Software Developer,
> > 4over, Inc
> > darrellh at 4over.com
> > 818-246-1170 ext. 285
> >
> >
> >
> > On Mon, Aug 1, 2011 at 9:53 AM, Levi Stanley <levi at eneservices.com>
> wrote:
> >> <p>Last login ${php: $time.timeFromNow($item.getCreated())}</p>
> >>
> >> Message:<br /> <b>Parse error</b>: syntax error, unexpected T_STRING in
> >> <b>/usr/share/php/PHPTAL.php(845) :
> >>
> /www/sites/[domain-was-here]/application/../tal/cache/tpl_4e3629a0_users__4qOO_B2LvUN4WCVHcqjFgQ.php</b>
> >> on line <b>40</b><br />
> >>
> >> Best regards,
> >> Levi Stanley
> >> _______________________________________________
> >> PHPTAL mailing list
> >> PHPTAL at lists.motion-twin.com
> >> http://lists.motion-twin.com/mailman/listinfo/phptal
> >>
> >>
> >
> > _______________________________________________
> > PHPTAL mailing list
> > PHPTAL at lists.motion-twin.com
> > http://lists.motion-twin.com/mailman/listinfo/phptal
> >
> > _______________________________________________
> > PHPTAL mailing list
> > PHPTAL at lists.motion-twin.com
> > http://lists.motion-twin.com/mailman/listinfo/phptal
> >
> >
>
> _______________________________________________
> PHPTAL mailing list
> PHPTAL at lists.motion-twin.com
> http://lists.motion-twin.com/mailman/listinfo/phptal
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.motion-twin.com/pipermail/phptal/attachments/20110801/c1096a85/attachment.htm


More information about the PHPTAL mailing list