chmpdog Posted July 14, 2009 Share Posted July 14, 2009 Hi, I don't really have a question, but I wanted to learn about php. I am pretty good at the language but I wanted to start a topic about random facts that I might have missed. So post a random php fact / hint that you think is unique. Here I'll go first: "Regex for email validation can sometimes return on valid email addresses." Quote Link to comment Share on other sites More sharing options...
trq Posted July 14, 2009 Share Posted July 14, 2009 "Regex for email validation can sometimes return on valid email addresses." That one is brilliant. Quote Link to comment Share on other sites More sharing options...
phporcaffeine Posted July 14, 2009 Share Posted July 14, 2009 Are you serious? Quote Link to comment Share on other sites More sharing options...
JonnoTheDev Posted July 14, 2009 Share Posted July 14, 2009 Regex for email validation can sometimes return on valid email addresses Fact 2: Fact 1 is bollox and makes as much sense as a left handed screwdriver. Quote Link to comment Share on other sites More sharing options...
Adam Posted July 14, 2009 Share Posted July 14, 2009 Haha! Perhaps re-read that to yourself a few times? Quote Link to comment Share on other sites More sharing options...
seventheyejosh Posted July 14, 2009 Share Posted July 14, 2009 that broke me Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted July 14, 2009 Share Posted July 14, 2009 Random fact: PHP has a manual, it's good, and it probably answers your question. Edit: Who the hell added a word filter for r_tfm (excluding underscore) to "read the manual"? I'll have to go fix that... Edit 2: Better, but pretty stupid that SMF parses word filters before smileys. Quote Link to comment Share on other sites More sharing options...
.josh Posted July 14, 2009 Share Posted July 14, 2009 probably the same person who added the other word filters. IMO they should be nixed altogether. Quote Link to comment Share on other sites More sharing options...
.josh Posted July 14, 2009 Share Posted July 14, 2009 here's a tip: typing http://www.php.net/functionhere will take you to the manual entry of the function (or a list of suggestions if you misspelled it or suggestions of something that might be useful) Also I don't think a whole lot of people here know that you can do [m]function[/m] on these boards and it will auto-link to the manual. Quote Link to comment Share on other sites More sharing options...
Andy-H Posted July 14, 2009 Share Posted July 14, 2009 here's a tip: typing http://www.php.net/functionhere will take you to the manual entry of the function (or a list of suggestions if you misspelled it or suggestions of something that might be useful) Also I don't think a whole lot of people here know that you can do [m]function[/m] on these boards and it will auto-link to the manual. str_rot13 Test --- Edit - W00T! Thats gonna save me alot of time, I've been doing [url=http://php.net/funcname]funcname()[/url] Quote Link to comment Share on other sites More sharing options...
nrg_alpha Posted July 15, 2009 Share Posted July 15, 2009 "Regex for email validation can sometimes return on valid email addresses." :-\ Sometimes eh? Speaks volumes of the regex pattern in question if that's the case. Here's my contribution: $facts = array('In their first year of life, puppies grow 10 times faster than human infants do.', 'Heavy thought: The world\'s termites outweigh the world\'s humans 10 to 1.', 'Eagles see better than humans on clear days. Humans see better than eagles on foggy days.', 'Rule of thumb: Nearly all boys grow at least as tall as thier mothers.', 'Only 48% of the sun\'s energy actually reaches the earth.', 'Elephants can\'t jump. Every other mammal can.', 'Circus clowns have a "Face Registry" to prevent other clowns from plagiarizing their faces.', 'Hair grows at a rate of .00000001 miles per hour.' ); // facts from 'The Best of Uncle John's Bathroom Reader echo $facts[mt_rand(0,7)]; It's random facts, and it involves PHP. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.