• I want to learn PHP
    41 replies, posted
<?php echo ("Sup, web development?") ?> I've done some very basic lua programming, but I'm thinking of getting a web server and experimenting around with PHP. What should I do first? I'm willig to get the server just to fool around. PHP seems interesting and I really want to learn it. [editline]15th December 2010[/editline] So alright, a guy I'm working with set up a basic server for me Yay :buddy:
There's no need to get a whole server just to start messing around with PHP, you can set up a local server on your own box pretty easily, if you're running Windows, check out [url=http://www.wampserver.com/en/]WAMP[/url]. It's got a pretty easy setup, and it's free and fully customizable, unlike shared hosting often is. A common first project for many newcomers to PHP is a simple blog that interfaces with a MySQL database. Learning to do this should help you learn some of the the basic building blocks of PHP, off of which you should be able to tackle more complex problems. Because a blog is such a common first project there are a bunch of tutorials out there like [url=http://net.tutsplus.com/tutorials/php/how-to-create-an-object-oriented-blog-using-php/]this one[/url].
echo "Sup, PrusseReborn"; There's a lots of tutorial out there but the most important pages are [url]http://www.w3schools.com/php/default.asp[/url] and [url]http://php.net[/url] Study from those sites and start fooling around. When you start hating php enough, start looking for an alternative.
[QUOTE=Skorpy;26708383]When you start hating php enough, start looking for an alternative.[/QUOTE] Just stop.
[QUOTE=Qombat;26708387]Just stop.[/QUOTE] Ok.
I still can't understand why people are hating on PHP, personally i think it's the easiest/best language for web out there.
[QUOTE=Giraffen93;26708415]I still can't understand why people are hating on PHP, personally i think it's the easiest/best language for web out there.[/QUOTE] I use PHP primarily, but I do admit it has shortcomings here and there. People hate on it for various reasons. That's not what the OP asked, we're not going into it here. [editline]15th December 2010[/editline] OP, pay attention to [url=http://www.facepunch.com/threads/1013645-Common-Mistakes-(AKA-How-to-Not-Get-Your-Shit-Fucked-Up)]this thread[/url] while you're learning PHP. It's best to learn such practices as you're learning.
Here we go! [url]http://ole.cavemen.no/test.php[/url]
[QUOTE=Giraffen93;26708415]I still can't understand why people are hating on PHP, personally i think it's the easiest/best language for web out there.[/QUOTE] [url=http://codepad.org/C0VzASUy]"01" == "1"[/url]
[QUOTE=Siemens;26708476][url=http://codepad.org/C0VzASUy]"01" == "1"[/url][/QUOTE] 0 === false, not 0 == false.
PHP is fine for starting out, but it's also easy to learn bad practices through using it. [editline]15th December 2010[/editline] Mainly because it inherently has some design flaws, but they're not bad to the point of completely destroying the language
[QUOTE=a2h;26708497]Mainly because it inherently has some design flaws, but they're not bad to the point of completely destroying the language[/QUOTE] They're nowhere near. If that were the case software like Wordpress, vBulletin, IP Board and MediaWiki would've been written in ASP.NET or something.
More PHP [b]fun[/b]: [php] <?php var_dump($a["foo"]); var_dump(&$a["foo"]); // so $a hasn't actually been defined at all, has it? var_dump($a); [/php] [url]http://codepad.org/ezXttVSb[/url]
[QUOTE=Siemens;26708518]More PHP [b]fun[/b]: [php] <?php var_dump($a["foo"]); var_dump(&$a["foo"]); // so $a hasn't actually been defined at all, has it? var_dump($a); [/php] [url]http://codepad.org/ezXttVSb[/url][/QUOTE] If you somehow manage to find a viable argument that PHP is bad based around this, I will be very surprised. Don't listen to Siements in a PHP vs X debate, it's like listening to a broken record.
[QUOTE=Qombat;26708517]They're nowhere near. If that were the case software like Wordpress, vBulletin, IP Board and MediaWiki would've been written in ASP.NET or something.[/QUOTE] Just because it's easy to learn bad practices through a language doesn't necessarily make it impossible to code something good in such language. Though I hear Drupal begs to differ with its [i]beautiful[/i] codebase
[QUOTE=a2h;26708541]Just because it's easy to learn bad practices through a language doesn't necessarily make it impossible to code something good in such language. Though I hear Drupal begs to differ with its [i]beautiful[/i] codebase[/QUOTE] I only quoted your second sentence. Your first sentence I had no problems with. :v:
[QUOTE=Qombat;26708534]If you somehow manage to find a viable argument that PHP is bad based around this, I will be very surprised. Don't listen to Siements in a PHP vs X debate, it's like listening to a broken record.[/QUOTE] PHP shouldn't be adding a new key for you and mutating an array you never created just because you try to access it.
[QUOTE=Siemens;26708548]PHP shouldn't be adding a new key for you and mutating an array you never created just because you try to access it.[/QUOTE] You're assuming someone is going to actually execute those commands in that circumstance. It's a bullshit example which is only true because of your insanity-provoking nitpickyness. [editline]15th December 2010[/editline] [QUOTE](08:38:08 PM) Elliot: what is it doing (08:38:12 PM) Elliot: I know it's a goddamn PHP function. (08:38:13 PM) Elliot: Fuck. (08:38:14 PM) Charlie: i have no fucking idea (08:38:17 PM) Charlie: what it is doing[/QUOTE] I rest my case.
[QUOTE=Qombat;26708545]I only quoted your second sentence. Your first sentence I had no problems with. :v:[/QUOTE] Bad practices through design flaws
[QUOTE=a2h;26708564]Bad practices through design flaws[/QUOTE] Design flaws being so bad they destroy the language.
[QUOTE=Qombat;26708557][quote](08:38:14 PM) Charlie: i have no fucking idea (08:38:17 PM) Charlie: what it is doing[/quote] I rest my case.[/QUOTE] Your case is that PHP is such a batshit insane language that it's hard to understand what the fuck it's actually doing? [editline]hi[/editline] Also: [php] <?php $hi = 'z'; echo $hi + 1 . "\n"; $hi++; echo $hi . "\n"; [/php] [url]http://codepad.org/icnDvc1e[/url]
[QUOTE=Qombat;26708571]Design flaws being so bad they destroy the language.[/QUOTE] They don't. I never said they did.
[QUOTE=Siemens;26708598]Your case is that PHP is such a batshit insane language that it's hard to understand what the fuck it's actually doing?[/QUOTE] Nope. [editline]15th December 2010[/editline] [QUOTE=a2h;26708601]They don't. I never said they did.[/QUOTE] I know. Re-read my post. You said they didn't, I expanded upon that saying they were nowhere near.
[php]<?php echo version_compare('anaconda', 'acromantula'); echo version_compare('baby', 'blister'); echo version_compare('change', 'cloister'); echo version_compare('deviant', 'defines'); echo version_compare('anaconda', 'blister'); echo version_compare('baby', 'defines'); echo version_compare('cloister', 'defines'); echo version_compare('places', 'races'); ?>[/php] :10bux: if you can correctly guess the output. [url]http://codepad.org/NTcaVheH[/url]
This has gotten way off topic...
It has, I'm not gonna bother asking here if you just start getting pissed at each other
Siemens and I took it to MSN, should be quiet now.
[QUOTE=PrusseReborn;26708681]It has, I'm not gonna bother asking here if you just start getting pissed at each other[/QUOTE] Some lively discussion never hurts. Anyway, don't get me wrong, PHP should definitely be fine.
Here's the "site" as per now [url]http://ole.cavemen.no/[/url] image is clickable
I have no idea how your current example demonstrates PHP.
Sorry, you need to Log In to post a reply to this thread.