# . period for Class Syntax references

- Thread: https://externals.io/message/15514
- Original archive: https://news-web.php.net/php.internals/15514
- Started by php@karsites.net on 2005-03-20T22:09:54+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #15514 — php@karsites.net — 2005-03-20T22:09:54+00:00

URL: https://externals.io/message/15514#15514

Hi all.

I don't know if this has been implemented yet.

Is it possible to make the '.' period character act 
place of the '->' character pair in class references, 
without conflicting with the '.' concatenation character?

Possibly would have to implement the two styles of 
referencing to allow for backward compatibility?

So, instead of writing: $this->my_var, one could then write
$this.my_var, which would be alot more in common with other 
OOP languages.

Maybe it's me, but I find it alot easier to read and 
pronounce '$this.my_var' == $this dot my_var, 

than something like 

'$this->my_var' == $this right-arrow my_var

Or, even some other single character that may be used 
instead of the '->' pair. Any suggestions please?

Regards - Keith Roberts

http://www.karsites.net/

---

## #15515 — Derick Rethans — 2005-03-20T22:16:09+00:00

URL: https://externals.io/message/15514#15515 · In reply to: #15514

> I don't know if this has been implemented yet.
> 
> Is it possible to make the '.' period character act 
> place of the '->' character pair in class references, 
> without conflicting with the '.' concatenation character?

No, this is not possible.

regards,
Derick

-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org

---

## #15516 — php@karsites.net — 2005-03-20T22:45:24+00:00

URL: https://externals.io/message/15514#15516

Thankyou for your quick replies Derick and Jason.

I've taken a look at the link below - but I don't want to 
make any non-standard changes to the php engine - If it's 
working, don't 'fix' it! I want my code to be portable as 
well!

I agree with Andrei Zmievski's point of view though.
It's a shame it could not be implemented as a standard 
feature of php zend engine.

Regards - Keith Roberts



> To: "php@karsites.net" <php@karsites.net>
> From: Jason Sweat <jason.sweat@gmail.com>
> Subject: Re: [PHP-DEV] . period for Class Syntax references
> 
> On Sun, 20 Mar 2005 22:09:54 +0000 (GMT), php@karsites.net
> <php@karsites.net> wrote:
> > […]
> 
> Very dangerous to the long term maintainability of your code, but you
> could look at:
> http://www.gravitonic.com/software/php/ (near the bottom of the page)
> which links to http://www.gravitonic.com/software/php/patches/ze2_concat_obj_op.diff.gz
> 
> Regards,
> Jason
> http://blog.casey-sweat.us/
