const definition bug?
4 posts
• Page 1 of 1
const definition bug?
Hi,
I have reached my point of desperate...
I am unable to compile this code:
I am still geting error like:
Syntax error: unexpected token '"'
What should be wrong?
Pospa
I have reached my point of desperate...
I am unable to compile this code:
- Code: Select all
class cl_xyz implements base_class
{
/**
* URI validate pattern
*/
const URI_VALIDATE_PATTERN = "/^(?:%[[:xdigit:]]{2}|[A-Za-z0-9-_.!~*'()\[\];\/?:@&=+$,])*$/";
I am still geting error like:
Syntax error: unexpected token '"'
What should be wrong?
Pospa
Jan Pospíšil
-<{Pospa}>-
-<{Pospa}>-
-
pospa - Posts: 2
- Joined: November 21st, 2012, 12:35 pm
Re: const definition bug?
Hi,
You've found old PHP behaviour - the string contains $ sign, so parser expects a variable and string itself cannot be used as a constant then.
We'll fix this in a future release.
Thanks!
You've found old PHP behaviour - the string contains $ sign, so parser expects a variable and string itself cannot be used as a constant then.
We'll fix this in a future release.
Thanks!
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
Re: const definition bug?
BTW you can use single quoted string for now.
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
Re: const definition bug?
Hi, the issue has been fixed, so it is available for those who compile Phalanger from sources at GitHub
https://github.com/DEVSENSE/Phalanger/c ... 94ad312ac8
https://github.com/DEVSENSE/Phalanger/c ... 94ad312ac8
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 36 guests