64 Comments
- GorfTron, on 10/10/2007, -3/+14One thing most people don't know about PHP is what PHP is.
- AvengeX, on 10/10/2007, -0/+10The actual method is called "chaining", and yes, it's very handy.
- tdous, on 10/10/2007, -0/+9Sickening, over-used, teen movie ***** sentence structure, carrying a usually poor point with false weight "much"?
- datagod, on 10/10/2007, -2/+8PHP = "the PHP Hypertext Pre-processor".
GNU = "GNU is Not Unix"
As for the artice, it should be titled "15 obscure features of PHP that only extremely advanced PHP / OOP programmers would even begin to understand" - KillTheRhythm, on 10/10/2007, -1/+7If you don't like it, don't read it. Simple as.
- seventoes, on 10/10/2007, -0/+5Dont click it if you dont want to read it.
- radicaldementia, on 10/10/2007, -0/+5Some of these things are kinda useless, but others like abstract classes and preg_split are really useful. __autoload is also useful when dealing with unserializing objects.
- traphik, on 10/10/2007, -2/+7Well in an object "$this" refers to that object. So if you "return $this;" you are returning an instance of the object that method lies within. It is useful for things like a SQL builder.
$db->select('*')->from('users')->where('id = 0'); - Scriptor, on 10/10/2007, -0/+4For those who want to build good frameworks or libraries/toolkits with PHP, these features are often very handy.
- SiRwhilms, on 10/10/2007, -0/+4Knew all of these except 1 and 2... some of these aren't very useful but many come in handy in some of the trickier situations.
- TenebrousX, on 10/10/2007, -0/+3Incompetent devs account for 99% of explot attacks
- emehrkay, on 10/10/2007, -0/+3static fam. meaning that you dont instantiate the class, but can use the methods inside. and my example would be wrong, replace $this with $self
- Avor, on 10/10/2007, -0/+2Because null is nothing and you are requesting an object. Why would you give it nothing at request for it? At least give an instance of a new object of the type.
- coldskool, on 10/10/2007, -0/+2Tedious much?
- kingkilr, on 10/10/2007, -1/+3$test= new test;
$return=$test->one()->two(); - traphik, on 10/10/2007, -0/+2Actually, I had him add more things.
- jarod42, on 10/10/2007, -0/+2much better than the other article - kudos especially for pointing out the SPL. and method chaining
- DanaK, on 10/10/2007, -0/+2you forgot nbr 16.
16. Immediately on constructing your first assignment statement, you instantaneous feel like you are better than any developer who doesn't code in php. - antych, on 10/10/2007, -0/+1Lists like this are usually crap, but this one is actually ok.
- ElMoselYEE, on 10/10/2007, -0/+1i like how you rewrote the title. very interesting and very creative. good job...spoon?
- daridave, on 10/10/2007, -0/+1Interesting article, great points, however it's a terrible read.
He makes easy things sound complicated, the explenations are real bad. I knew most of what he was talking about, but I expect beginners to have a hard time understand what the heck he's talking about.
No digg. - esengulov, on 10/10/2007, -0/+1I thought engadget stopped putting DIGG buttons on non-original stories.
- d03boy, on 10/10/2007, -3/+4It's very common OOP stuff... I dont think the article was intended for people who knew nothing about OOP...
- FKnight, on 10/10/2007, -0/+1
QUICK !! BURY!!! ONLY MICROSOFT IS ALLOWED TO LOOK INSECURE ON DIGG ! - inactive, on 10/10/2007, -1/+2Not sure why you're getting dugg down. It's a valid point. Just about every other object oriented language lets you pass null when requesting an object of a certain type.
- spadgos, on 10/10/2007, -0/+1that's different though. In Bazookaaa's example, all you're doing is passing an associative array, whereas you'd use func_get_args() to when you're passing a variable number of arguments.
- captainpete, on 10/10/2007, -0/+1or want to use.
- zachninme, on 10/10/2007, -0/+1Yay PHP?
Heck, even ASP does this stuff...
(Python does too, and I assume Ruby can as well) - tomi, on 10/10/2007, -1/+1On a tech site, like digg, this 'joke' fails for stuff tech-related items.
- IllBeBack, on 10/10/2007, -2/+2yeah. *burrrrrrrrp*
- Azulus, on 10/10/2007, -0/+0Don't know about useless, I've personally used #s 3, 4, 5, 6, 7, 8, 9, 10, 11, 13 and 14 in some pretty big projects. I can see where reflection would be useful as I've used it in other languages, but never had a use in PHP. And I hadn't heard of ticks until this, I think it could be extremely useful though.
- inactive, on 10/10/2007, -0/+0People need to stop making the PCP joke, it's getting old.
- bigtech64, on 10/10/2007, -0/+016. It's actually spelled P - H - P. A lot of people get that wrong.
- regtweakerchris, on 10/10/2007, -1/+1Ummm looks like Wordpress isn't run off pure PHP. Go fig. That looked like French to me. Maybe because I just drank two beers.
- arekarek, on 10/10/2007, -1/+0but still, first article was far more interesting
- crash128, on 10/10/2007, -1/+0Title doesn't follow standard digg pattern. It should be Top 10, followed by a superlative, and then a teaser. Top 10 coolest things no one knows about PHP. That I'd read. But Top 15 cool things most people - I'm sorry, I don't have the time, I don't work for you.
- userini, on 10/10/2007, -2/+1Now, did anyone notice that the article url is 11-cool-things-about-php-that-most-people-overlook? Sounds to me like the author decided to buff up his list of "cool things about PHP" with another 4 non-note-worthy PHP features (i.e. static keyword) just to make the number round :P
- traphik, on 10/10/2007, -2/+1*cough* func_get_args()
- nodesdesktop, on 10/10/2007, -1/+0Most of them REQUIRE PHP5. It'll be interesting to see what PHP v.x brings.
- DjOverEZ, on 10/10/2007, -6/+5I swear to god I read, "15 Really Cool Things Most People Don't Know About PCP." Now that I know it doesn't say that, I kinda wish it did...
- emehrkay, on 10/10/2007, -2/+1my question is can you chain static methods ex:
class test{
public static function one(){return $this;}
public static function two(){return $this;}
}
test::one()->test::two();
what would the syntax be as mine doesnt make sense? - k4st, on 10/10/2007, -2/+1http://digg.com/programming/12_Things_You_Should_Dislike_About_PHP
- achacha, on 10/10/2007, -3/+2They forgot: it:
PHP accounts for 80-90% of exploit attacks on any given web server (check securityfocus and bugtraq); it makes microsoft seem like a rock solid security company. PHP admin holes, PHP mail holes, PHP proxy exploits and PHP buffer overflows account for too much of my web server logs (for every 8-10 PHP attacks, I get 1 usual ancient microsoft HTTP Autheticate overflow); I don't even run PHP. I, for one, want to see PHP go away until it can be cleaned up (a lot). - james1000, on 10/10/2007, -2/+0php is cooler than u!
- wildmXranat, on 10/10/2007, -3/+1Anyone that needs to be aware of Good an Bad things offered by PHP should know these, and i"ll leave it up to the public to figure out which ones are bad and which ones are good.
- slheaow168, on 10/10/2007, -3/+1i thought this said pcp.
- thecheatah, on 10/10/2007, -5/+2there is some black voodo in php.
BTW in php null has no type. Meaning if you ask for object of type x, it has to be an object. it cannot be null. I just thought that was retarded. Does anyone know any real reason they did that? - inactive, on 10/10/2007, -6/+316. preg_replace(php, ror);
- rivostevo, on 10/10/2007, -6/+215 Ways Not To Find A Girlfriend
- ProphetSix, on 10/10/2007, -7/+2(strong bad) OH NOES! My head asplode! (/strong bad)
-
Show 51 - 58 of 58 discussions



What is Digg?
Digg is coming to a city (and computer) near you! Check out all the details on our