Remove Ad, Sign Up
Register to Remove Ad
Register to Remove Ad
Remove Ad, Sign Up
Register to Remove Ad
Register to Remove Ad
Signup for Free!
-More Features-
-Far Less Ads-
About   Users   Help
Users & Guests Online
On Page: 1
Directory: 174
Entire Site: 5 & 929
Page Staff: pokemon x, pennylessz, Barathemos, tgags123, alexanyways, supercool22, RavusRat,
04-18-24 11:45 PM

Thread Information

Views
26,733
Replies
135
Rating
0
Status
CLOSED
Thread
Creator
Davideo7
12-04-05 04:35 PM
Last
Post
Lazlo Falconi
05-24-16 12:54 AM
Additional Thread Details
Views: 3,533
Today: 0
Users: 0 unique

Thread Actions

Thread Closed
New Thread
New Poll
Order
Posts


<<
7 Pages
>>
 

Official PHP Thread

 

08-03-06 06:14 PM
BigBob85 is Offline
| ID: 52943 | 9 Words

BigBob85
Level: 151

POSTS: 3445/6381
POST EXP: 217397
LVL EXP: 42859699
CP: 170.6
VIZ: 49768

Likes: 0  Dislikes: 0
[sarcasm]yeh, like right...[/sarcasm]

Somthn like that?

sup tags work?
[sarcasm]yeh, like right...[/sarcasm]

Somthn like that?

sup tags work?
Vizzed Elite
Member Of The Year 07


Affected by 'Laziness Syndrome'

Registered: 12-09-04
Location: Melbourne, Australia
Last Post: 1597 days
Last Active: 1231 days

(edited by BigBob85 on 08-03-06 07:19 PM)    

08-03-06 06:18 PM
MichaelVash7886 is Offline
| ID: 52944 | 4 Words

Level: 161


POSTS: 5685/7398
POST EXP: 196466
LVL EXP: 53514758
CP: 124.6
VIZ: 73784

Likes: 0  Dislikes: 0
Maybe that will work.
Maybe that will work.
Vizzed Elite
The Quiet Paladin
LEGENDARY POSTER!
VIzzed Ville Gameshow Champion!!!(8-14-2005)


Affected by 'Laziness Syndrome'

Registered: 12-06-04
Location: Tennessee
Last Post: 3417 days
Last Active: 2720 days

08-06-06 02:15 AM
BigBob85 is Offline
| ID: 53230 | 7 Words

BigBob85
Level: 151

POSTS: 3489/6381
POST EXP: 217397
LVL EXP: 42859699
CP: 170.6
VIZ: 49768

Likes: 0  Dislikes: 0
Maby...
Back to php people, or ill
Maby...
Back to php people, or ill
Vizzed Elite
Member Of The Year 07


Affected by 'Laziness Syndrome'

Registered: 12-09-04
Location: Melbourne, Australia
Last Post: 1597 days
Last Active: 1231 days

08-06-06 03:20 PM
MichaelVash7886 is Offline
| ID: 53259 | 10 Words

Level: 161


POSTS: 5815/7398
POST EXP: 196466
LVL EXP: 53514758
CP: 124.6
VIZ: 73784

Likes: 0  Dislikes: 0
Well what is your next feature to put in Bobby?
Well what is your next feature to put in Bobby?
Vizzed Elite
The Quiet Paladin
LEGENDARY POSTER!
VIzzed Ville Gameshow Champion!!!(8-14-2005)


Affected by 'Laziness Syndrome'

Registered: 12-06-04
Location: Tennessee
Last Post: 3417 days
Last Active: 2720 days

08-06-06 08:05 PM
BigBob85 is Offline
| ID: 53290 | 31 Words

BigBob85
Level: 151

POSTS: 3507/6381
POST EXP: 217397
LVL EXP: 42859699
CP: 170.6
VIZ: 49768

Likes: 0  Dislikes: 0
Im not sure... im really not sure.
I did wana make a graph thing, that would be cool. Also make it effect price of stock market.
What ya's think of that?
Im not sure... im really not sure.
I did wana make a graph thing, that would be cool. Also make it effect price of stock market.
What ya's think of that?
Vizzed Elite
Member Of The Year 07


Affected by 'Laziness Syndrome'

Registered: 12-09-04
Location: Melbourne, Australia
Last Post: 1597 days
Last Active: 1231 days

08-06-06 08:37 PM
MichaelVash7886 is Offline
| ID: 53302 | 6 Words

Level: 161


POSTS: 5828/7398
POST EXP: 196466
LVL EXP: 53514758
CP: 124.6
VIZ: 73784

Likes: 0  Dislikes: 0
That'd be cool, but probably difficult.
That'd be cool, but probably difficult.
Vizzed Elite
The Quiet Paladin
LEGENDARY POSTER!
VIzzed Ville Gameshow Champion!!!(8-14-2005)


Affected by 'Laziness Syndrome'

Registered: 12-06-04
Location: Tennessee
Last Post: 3417 days
Last Active: 2720 days

08-07-06 09:50 AM
BigBob85 is Offline
| ID: 53380 | 36 Words

BigBob85
Level: 151

POSTS: 3534/6381
POST EXP: 217397
LVL EXP: 42859699
CP: 170.6
VIZ: 49768

Likes: 0  Dislikes: 0
I just gota get the right formula, so people dont get super rich off it.

I had a really good system, and ill talk about it in staff forum when and if i eventually make it.
I just gota get the right formula, so people dont get super rich off it.

I had a really good system, and ill talk about it in staff forum when and if i eventually make it.
Vizzed Elite
Member Of The Year 07


Affected by 'Laziness Syndrome'

Registered: 12-09-04
Location: Melbourne, Australia
Last Post: 1597 days
Last Active: 1231 days

08-07-06 10:00 PM
IceWave04 is Offline
| ID: 53397 | 22 Words

IceWave04
Level: 134

POSTS: 3343/4864
POST EXP: 234892
LVL EXP: 28357883
CP: 81.0
VIZ: 24732

Likes: 0  Dislikes: 0
Im gonna talk to you bout something related to this on WML tonight if your on.. So you betta be on..
Im gonna talk to you bout something related to this on WML tonight if your on.. So you betta be on..
Trusted Member

Affected by 'Laziness Syndrome'

Registered: 03-01-05
Last Post: 5353 days
Last Active: 5306 days

10-31-06 08:52 AM
BigBob85 is Offline
| ID: 54675 | 10 Words

BigBob85
Level: 151

POSTS: 3763/6381
POST EXP: 217397
LVL EXP: 42859699
CP: 170.6
VIZ: 49768

Likes: 0  Dislikes: 0
I don't think you ever talked to me about it.
I don't think you ever talked to me about it.
Vizzed Elite
Member Of The Year 07


Affected by 'Laziness Syndrome'

Registered: 12-09-04
Location: Melbourne, Australia
Last Post: 1597 days
Last Active: 1231 days

09-10-07 11:33 AM
Davideo7 is Online
| ID: 57086 | 61 Words

Davideo7
Level: 351


POSTS: 4970/45320
POST EXP: 3474068
LVL EXP: 811407236
CP: 191261.6
VIZ: 121500323

Likes: 0  Dislikes: 0
It's been a while since I've studied PHP but I recently started studying Classes (refer to here) and I was wondering what $this is.

And could someone explain the following code to me:

class SimpleClass
{
// member declaration
public $var = 'a default value';

// method declaration
public function displayVar() {
echo $this->var;
}
}
?>

The part that really throws me off is $this->var;


And one more question, what exactly does "Instanciating object" mean?

Hopefully Bigbob or Randy can answer my questions
It's been a while since I've studied PHP but I recently started studying Classes (refer to here) and I was wondering what $this is.

And could someone explain the following code to me:

class SimpleClass
{
// member declaration
public $var = 'a default value';

// method declaration
public function displayVar() {
echo $this->var;
}
}
?>

The part that really throws me off is $this->var;


And one more question, what exactly does "Instanciating object" mean?

Hopefully Bigbob or Randy can answer my questions
The Owner
Owner, Developer, Advertiser, etc
Founder, Mod, Investor


Affected by 'Carpal Tunnel Syndrome'

Registered: 12-06-04
Location: Wisconsin
Last Post: 13 hours
Last Active: 3 min.

09-10-07 10:48 PM
BigBob85 is Offline
| ID: 57109 | 106 Words

BigBob85
Level: 151

POSTS: 4200/6381
POST EXP: 217397
LVL EXP: 42859699
CP: 170.6
VIZ: 49768

Likes: 0  Dislikes: 0
I havnt done classes in php, but have in java.

This usualy refers to this class.
class SimpleClass
{
// member declaration
public $var = 'a default value';

// method declaration
public function displayVar() {
echo $this->var;
}
}
?>

so the method is saying echo the variable var that is in this class.

Do you understand Example 19.1 ?

EDIT :
Instanciating object i belive is refering to an instance of an object.
$myVar = 3;
Here you have an instance of a variable.

When you use a class, your creating an object, and that object is an instance of that class.
Do you follow?
I havnt done classes in php, but have in java.

This usualy refers to this class.
class SimpleClass
{
// member declaration
public $var = 'a default value';

// method declaration
public function displayVar() {
echo $this->var;
}
}
?>

so the method is saying echo the variable var that is in this class.

Do you understand Example 19.1 ?

EDIT :
Instanciating object i belive is refering to an instance of an object.
$myVar = 3;
Here you have an instance of a variable.

When you use a class, your creating an object, and that object is an instance of that class.
Do you follow?
Vizzed Elite
Member Of The Year 07


Affected by 'Laziness Syndrome'

Registered: 12-09-04
Location: Melbourne, Australia
Last Post: 1597 days
Last Active: 1231 days

(edited by BigBob85 on 09-10-07 10:51 PM)    

09-11-07 11:27 AM
Davideo7 is Online
| ID: 57130 | 51 Words

Davideo7
Level: 351


POSTS: 4990/45320
POST EXP: 3474068
LVL EXP: 811407236
CP: 191261.6
VIZ: 121500323

Likes: 0  Dislikes: 0
All that makes perfect sense, your more help than php.net
Thanks


EDIT: Here is an even bigger challenge, what exactly is going on here -


class A
{
function foo()
{
if (isset($this)) {
echo '$this is defined (';
echo get_class($this);
echo ")n";
} else {
echo "$this is not defined.n";
}
}
}

class B
{
function bar()
{
A::foo();
}
}

$a = new A();
$a->foo();
A::foo();
$b = new B();
$b->bar();
B::bar();
?>


and here is an example of that output:
$this is defined (a)
$this is not defined.
$this is defined (b)
$this is not defined.
All that makes perfect sense, your more help than php.net
Thanks


EDIT: Here is an even bigger challenge, what exactly is going on here -


class A
{
function foo()
{
if (isset($this)) {
echo '$this is defined (';
echo get_class($this);
echo ")n";
} else {
echo "$this is not defined.n";
}
}
}

class B
{
function bar()
{
A::foo();
}
}

$a = new A();
$a->foo();
A::foo();
$b = new B();
$b->bar();
B::bar();
?>


and here is an example of that output:
$this is defined (a)
$this is not defined.
$this is defined (b)
$this is not defined.
The Owner
Owner, Developer, Advertiser, etc
Founder, Mod, Investor


Affected by 'Carpal Tunnel Syndrome'

Registered: 12-06-04
Location: Wisconsin
Last Post: 13 hours
Last Active: 3 min.

(edited by Davideo7 on 09-11-07 11:37 AM)    

09-11-07 10:08 PM
BigBob85 is Offline
| ID: 57151 | 103 Words

BigBob85
Level: 151

POSTS: 4206/6381
POST EXP: 217397
LVL EXP: 42859699
CP: 170.6
VIZ: 49768

Likes: 0  Dislikes: 0
I seen that example there , heres a breakdown of it.
<?php
class A
{
function foo()
{
if (isset($this)) {
echo '$this is defined (';
echo get_class($this);
echo ")n";
} else {
echo "$this is not defined.n";
}
}
}

Creates a class file, called A, and gives it a function, foo. Foo will echo wether this class is an object or not.

class B
{
function bar()
{
A::foo();
}
}

Creates a class B, with its own function, bar, which calls foo() from class A, but dosnt create an object of it.

$a = new A();
Creates an object of class A, and stores it into $a.
$a->foo();
Uses the object $a and calls the function foo().

A::foo();
Calls the function foo, from class A, but dosnt create an object of it.


$b = new B();
$b->bar();
B::bar();

Same for these ones.
?>


$a = new A(); |=| Creates the object
$a->foo(); |=| Calls the function foo, of object $a ($this is defined (a))
A::foo(); |=| Calls the function foo, without making an object ($this is not defined.)

A little bit of extra stuff that you can probably guess.
get_class($this);
Will return the object name
n new line character.

I seen that example there , heres a breakdown of it.
<?php
class A
{
function foo()
{
if (isset($this)) {
echo '$this is defined (';
echo get_class($this);
echo ")n";
} else {
echo "$this is not defined.n";
}
}
}

Creates a class file, called A, and gives it a function, foo. Foo will echo wether this class is an object or not.

class B
{
function bar()
{
A::foo();
}
}

Creates a class B, with its own function, bar, which calls foo() from class A, but dosnt create an object of it.

$a = new A();
Creates an object of class A, and stores it into $a.
$a->foo();
Uses the object $a and calls the function foo().

A::foo();
Calls the function foo, from class A, but dosnt create an object of it.


$b = new B();
$b->bar();
B::bar();

Same for these ones.
?>


$a = new A(); |=| Creates the object
$a->foo(); |=| Calls the function foo, of object $a ($this is defined (a))
A::foo(); |=| Calls the function foo, without making an object ($this is not defined.)

A little bit of extra stuff that you can probably guess.
get_class($this);
Will return the object name
n new line character.

Vizzed Elite
Member Of The Year 07


Affected by 'Laziness Syndrome'

Registered: 12-09-04
Location: Melbourne, Australia
Last Post: 1597 days
Last Active: 1231 days

03-20-08 10:21 AM
is Offline
| ID: 62704 | 32 Words


JigSaw
Level: 164


POSTS: 213/7936
POST EXP: 584185
LVL EXP: 57378180
CP: 8045.8
VIZ: -46031833

Likes: 0  Dislikes: 0
I'm not sure if this is PHP related but I'm guessing it is. How do you make a url that ends with a / instead of a .html or .php?

Example:
www.test.com/articles/1121
I'm not sure if this is PHP related but I'm guessing it is. How do you make a url that ends with a / instead of a .html or .php?

Example:
www.test.com/articles/1121
Vizzed Elite
PHP Developer, Security Consultant

Affected by 'Laziness Syndrome'

Registered: 04-06-06
Location: Area 51
Last Post: 1727 days
Last Active: 1722 days

03-20-08 10:33 AM
Davideo7 is Online
| ID: 62705 | 30 Words

Davideo7
Level: 351


POSTS: 6077/45320
POST EXP: 3474068
LVL EXP: 811407236
CP: 191261.6
VIZ: 121500323

Likes: 0  Dislikes: 0
Those numbers 1121 might just be the name of the folder and in that folder if there's any file named 'index' that page will automatically be loaded.

That make sense?
Those numbers 1121 might just be the name of the folder and in that folder if there's any file named 'index' that page will automatically be loaded.

That make sense?
The Owner
Owner, Developer, Advertiser, etc
Founder, Mod, Investor


Affected by 'Carpal Tunnel Syndrome'

Registered: 12-06-04
Location: Wisconsin
Last Post: 13 hours
Last Active: 3 min.

03-20-08 10:35 AM
is Offline
| ID: 62706 | 9 Words


JigSaw
Level: 164


POSTS: 214/7936
POST EXP: 584185
LVL EXP: 57378180
CP: 8045.8
VIZ: -46031833

Likes: 0  Dislikes: 0
Wow, thanks a bunch I gotta try that out
Wow, thanks a bunch I gotta try that out
Vizzed Elite
PHP Developer, Security Consultant

Affected by 'Laziness Syndrome'

Registered: 04-06-06
Location: Area 51
Last Post: 1727 days
Last Active: 1722 days

03-20-08 10:55 AM
Davideo7 is Online
| ID: 62708 | 20 Words

Davideo7
Level: 351


POSTS: 6078/45320
POST EXP: 3474068
LVL EXP: 811407236
CP: 191261.6
VIZ: 121500323

Likes: 0  Dislikes: 0
Well the name of the file needs to be index followed by an extension; examples:
index.htm
index.html
index.php
index.aspx
etc...
Well the name of the file needs to be index followed by an extension; examples:
index.htm
index.html
index.php
index.aspx
etc...
The Owner
Owner, Developer, Advertiser, etc
Founder, Mod, Investor


Affected by 'Carpal Tunnel Syndrome'

Registered: 12-06-04
Location: Wisconsin
Last Post: 13 hours
Last Active: 3 min.

03-20-08 12:09 PM
is Offline
| ID: 62718 | 28 Words


JigSaw
Level: 164


POSTS: 216/7936
POST EXP: 584185
LVL EXP: 57378180
CP: 8045.8
VIZ: -46031833

Likes: 0  Dislikes: 0
I see now... I don't know why I didn't know this and to think I spent hours searching and thinking it was php related lol. I'm getting rusty
I see now... I don't know why I didn't know this and to think I spent hours searching and thinking it was php related lol. I'm getting rusty
Vizzed Elite
PHP Developer, Security Consultant

Affected by 'Laziness Syndrome'

Registered: 04-06-06
Location: Area 51
Last Post: 1727 days
Last Active: 1722 days

03-21-08 06:03 PM
BigBob85 is Offline
| ID: 62918 | 33 Words

BigBob85
Level: 151

POSTS: 5042/6381
POST EXP: 217397
LVL EXP: 42859699
CP: 170.6
VIZ: 49768

Likes: 0  Dislikes: 0
there is also some order to which what files run first (maybe alpahbetcial extention).

eg.
index.php
index.html
in the same directory, index.html will run instead of index.php. Hopefully my shortend example makes sense.
there is also some order to which what files run first (maybe alpahbetcial extention).

eg.
index.php
index.html
in the same directory, index.html will run instead of index.php. Hopefully my shortend example makes sense.
Vizzed Elite
Member Of The Year 07


Affected by 'Laziness Syndrome'

Registered: 12-09-04
Location: Melbourne, Australia
Last Post: 1597 days
Last Active: 1231 days

03-21-08 06:41 PM
Davideo7 is Online
| ID: 62932 | 9 Words

Davideo7
Level: 351


POSTS: 6105/45320
POST EXP: 3474068
LVL EXP: 811407236
CP: 191261.6
VIZ: 121500323

Likes: 0  Dislikes: 0
Are you sure PHP gets run before HTML extensions?
Are you sure PHP gets run before HTML extensions?
The Owner
Owner, Developer, Advertiser, etc
Founder, Mod, Investor


Affected by 'Carpal Tunnel Syndrome'

Registered: 12-06-04
Location: Wisconsin
Last Post: 13 hours
Last Active: 3 min.

Links

Page Comments


This page has no comments

Adblocker detected!

Vizzed.com is very expensive to keep alive! The Ads pay for the servers.

Vizzed has 3 TB worth of games and 1 TB worth of music.  This site is free to use but the ads barely pay for the monthly server fees.  If too many more people use ad block, the site cannot survive.

We prioritize the community over the site profits.  This is why we avoid using annoying (but high paying) ads like most other sites which include popups, obnoxious sounds and animations, malware, and other forms of intrusiveness.  We'll do our part to never resort to these types of ads, please do your part by helping support this site by adding Vizzed.com to your ad blocking whitelist.

×