"Cpt. Zeep" <ze**@nemame.com> wrote in message
news:bt**********@bagan.srce.hr...
Hello all!
I have a question regarding next few lines of code.
<?php
$person->name = "John Doe";
$person->age = "26";
?>
What does this piece of code actually do? It seems to create object
$person, but i am not shure if i can create objects without defining class first?
I'm little confused here :) This reminds me of structures in C...
Thanx!
--
Relaxen und watch das blinkenlights...
nothing more than an empty object with variables in it, 2 in this case
php is realy nice about auto.... (I forget the word) Basicaly, when you
first use something, it will be created for you right then. This is one
major differnce from a script language and a compiled one. dont get me
wrong, you can do this in a high level language, however for really tight
code compiling. say for a microchip, you do not want the overhead of
auto-defining. you simple state how big a varaible is going to be, so it
makes room for it.
--
Mike Bradley
http://gzen.myhq.info -- free online php tools