On Wed, 17 Jul 2002, Kondwani Spike Mkandawire wrote:
> Just for interest sake, for those of you who have messed
> with C know about Pointers hence probably know that
> one can access stuff from Memory Locations in very wierd
> ways via pointers and Arrays:
> int * ptr;
> ptr = array[0];
> ptr=ptr-1;
> The last statement does not generate an error but lets you
> access that location...

It may generate an error. Depends on where ptr-1 happens to be. In any
case it's not a bright thing to do as the effects are undefined and

> Firstly I want to know if PHP has pointers (I know it uses
> dereferencing values via &) and if it does use pointers
> does it let you do stuff like this (or does its nature not
> let you interact with the lower level hardware components?

PHP doesn't have pointers as such. It has references but you can't do math 
on them to create other references.

Pointers don't have anything to do with lower level hardware components. 
They're just one way of dealing with memory.


PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to