Data structure in php

Data structure in php

am 01.01.2008 14:26:15 von AND

How can i implement data structure like trees and graphs in php-cli?
Who knows where i can find tutorials?Thank You.

Re: Data structure in php

am 01.01.2008 14:49:54 von Jonas Werres

and schrieb:
> How can i implement data structure like trees and graphs in php-cli?
> Who knows where i can find tutorials?Thank You.

Since PHP5 uses references, you can implement it just like you would do
in in Java, e.g.

Re: Data structure in php

am 01.01.2008 18:07:11 von colin.mckinnon

On 1 Jan, 13:26, and wrote:
> How can i implement data structure like trees and graphs in php-cli?
> Who knows where i can find tutorials?Thank You.

Why do you think its different in PHP than in other languages?

C.

Re: Data structure in php

am 01.01.2008 19:12:15 von AND

On 1 Gen, 18:07, "C. (http://symcbean.blogspot.com/)"
wrote:
> On 1 Jan, 13:26, and wrote:
>
> > How can i implement data structure like trees and graphs in php-cli?
> > Who knows where i can find tutorials?Thank You.
>
> Why do you think its different in PHP than in other languages?
>
> C.

Does exist pointers in php?

Re: Data structure in php

am 01.01.2008 19:13:43 von AND

On 1 Gen, 14:49, Jonas Werres wrote:
> and schrieb:
>
> > How can i implement data structure like trees and graphs in php-cli?
> > Who knows where i can find tutorials?Thank You.
>
> Since PHP5 uses references, you can implement it just like you would do
> in in Java, e.g.

Are you talking about object oriented programming?

Re: Data structure in php

am 01.01.2008 20:14:19 von Jerry Stuckle

and wrote:
> On 1 Gen, 14:49, Jonas Werres wrote:
>> and schrieb:
>>
>>> How can i implement data structure like trees and graphs in php-cli?
>>> Who knows where i can find tutorials?Thank You.
>> Since PHP5 uses references, you can implement it just like you would do
>> in in Java, e.g.
>
> Are you talking about object oriented programming?
>

No, OO and references are not related. You can have one without the other.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: Data structure in php

am 01.01.2008 20:15:28 von Jerry Stuckle

and wrote:
> On 1 Gen, 18:07, "C. (http://symcbean.blogspot.com/)"
> wrote:
>> On 1 Jan, 13:26, and wrote:
>>
>>> How can i implement data structure like trees and graphs in php-cli?
>>> Who knows where i can find tutorials?Thank You.
>> Why do you think its different in PHP than in other languages?
>>
>> C.
>
> Does exist pointers in php?
>

No, PHP doesn't have pointers - like many languages. But you don't
need pointers to implement trees and graphs.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: Data structure in php

am 02.01.2008 09:22:23 von Jonas Werres

> Are you talking about object oriented programming?

Sure.

class LinearList
{
private $next;
private $content;

public getNext()
{
return $this->next;
}

public next(LinearList $next)
{
$this->next=$next;
}

public __toString()
{
return $this->content;
}
....
}

Re: Data structure in php

am 07.01.2008 13:11:16 von colin.mckinnon

On 1 Jan, 19:15, Jerry Stuckle wrote:
> and wrote:
> > On 1 Gen, 18:07, "C. (http://symcbean.blogspot.com/)"
> > wrote:
> >> On 1 Jan, 13:26, and wrote:
>
> >>> How can i implement data structure like trees and graphs in php-cli?
> >>> Who knows where i can find tutorials?Thank You.
> >> Why do you think its different in PHP than in other languages?
>
> >> C.
>
> > Does exist pointers in php?
>
> No, PHP doesn't have pointers - like many languages. But you don't
> need pointers to implement trees and graphs.
>
> --

PHP has references (which can be used to seperate data from navigation/
indexing methods - but they are *not* pointers)

C.