[pmwiki-users] Problem with $FmtPV;

Vince Admin Account vadmin at math.uconn.edu
Tue May 22 13:53:42 CDT 2007


On May 22, 2007, at 2:47 PM, Patrick R. Michaud wrote:

> On Tue, May 22, 2007 at 01:05:08PM -0400, Ben Wilson wrote:
>> On 5/22/07, Patrick R. Michaud <pmichaud at pobox.com> wrote:
>>>
>>> In the case where you had
>>>
>>>    $FmtPV['$YearWeek'] = 'a2007W19';
>>>
>>> when PHP evaluates "a2007W19" it sees it as a "bareword string"
>>> and automatically treats it as a string.  For example, in PHP I
>>> can write:
>>>
>>>    $x = a2007W19;
>>>
>>> PHP automaticaly treats the bareword string as though I had written:
>>>
>>>    $x = 'a2007W19';
>
> I should also note that even though PHP _allows_ a programmer
> to write bareword strings in this way, doing so is considered
> very bad (and potentially unsafe) programming practice.
>
> Pm
Patrick, please don't end there. Tell us what should be done.
Is it $x="a2007W19" or ...
Thanks




More information about the pmwiki-users mailing list