Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

OOP PHP

Name: Anonymous 2010-10-16 22:34

So i downloaded the latest Php version to try out this oop it has and i have some problems.


<?php
class foo{
    public $v1;
    public $v2;
}

$bar = new foo();
$bar->v1=1;
$bar->v2=5;
echo $bar->v1;
?>



now my problem is that the first '>'@($bar->v1=1;) makes the php script turn off and go back to html i guess... was there something else i needed to do before i could just jump right into oop php?

Name: Anonymous 2010-10-16 22:45

>>1
I'm afraid I can't help you, I'm far too much of a fag.  If anyone on here isn't a huge fag, maybe they can help you.  If no one helps you, I would presume, if I were you, that everyone who didn't help you but could have was too busy thinking of potential cocks they would like to suck.

Name: Anonymous 2010-10-16 23:11

>>2
You didn't have to remind me. It keeps piling up, it's not my fault.

Name: Anonymous 2010-10-16 23:42

/prog/ is not the place to come for webserver configuration help.

Name: Anonymous 2010-10-17 3:05

>>4
Not OP but: How is OP's question, (or even >>2,3 's comments) in anyway related to a web server's configuration?

PHP might be used for web apps and again, OP's code isn't that either.

So...

Does that look like a fucking Apache or Nginx config file to you, llama boy?

Name: Anonymous 2010-10-17 6:12

>>5
It's quite simple. The code he has is valid PHP, and it will produce the expected result if run directly. (Try saving it to temp.php and running 'php temp.php') The problem is that he will be running it from a webserver where the webserver is not set to interpret the code, but to simply print it.

Yes, I made a helpful post.

Name: Anonymous 2010-10-17 7:03

"Well, all the new languages have OOP, I guess we should add it to PHP."

Name: Anonymous 2010-10-17 7:07

>>7
Worse yet, PHP strives to be like Java.

Name: Anonymous 2010-10-17 10:21

>>6
OP here, the problem is though that all my other PHP code works just fine, BUT whenever it sees a '>' in my php code it stops interpreting it as php and goes back to html when it shouldn't do that till it hits '?>' at the end.

I've been searching online and i can't find anywhere with people having this problem, but if i can't find the answer that's ok since i'll just go back to non-oop approaches

Name: Anonymous 2010-10-17 11:43

>>8
So would that be an improvement or more decay?

Name: Anonymous 2010-10-17 12:21

well, my php works today, i'm not sure why it was fucking up last night

Name: Anonymous 2010-10-17 12:24

>>11
It just needed some rest

Name: Anonymous 2010-10-17 12:42

>>1
You actually have two problems. The first one is being confused about your problem, as evidenced by
now my problem is that the first '>'@($bar->v1=1;) makes the php script turn off and go back to html
Your second and real problem is that you are using PHP.

No need to thank me.

Name: Anonymous 2010-10-17 21:44

>>12
Lol'd harder than I should have

Name: Anonymous 2010-12-23 23:40

Name: Anonymous 2012-03-28 2:17

my farts burn my anus
it hurts
in a good way

Don't change these.
Name: Email:
Entire Thread Thread List