TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 09-30-2009, 09:40 PM   #1 (permalink)
The Visitor
 
Join Date: Sep 2009
Posts: 3
Thanks: 0
SneakyWhoami is on a distinguished road
Default Hello

My name is Chris, most internet people call me "Sneaky".
I live in New Zealand and talk about New Zealand things very often.

I like to drag up old, dead threads, double post, and ramble on at length before getting to the punch line.

Actually I only registered to post one reply to one thread, and that was a few months old. My work here is done now. The email notification of the welcome PM is what drew me back for this second post.

PHP has been one of my interests in a big way for a number of years now. I'm self taught, I don't consider myself a pro by any means, but I do alright. I know about things like scope, cross site scripting, member visibility, abstraction, controlling the compiler and the garbage collector, bytecode compiling, streams, serializers, the DOM, regular expressions...

I know many of the warnings, gotchas and usage recommendations from the frequently used functions's pages on php.net (don't use a powerful string splitter when humble explode() will do the job, don't use c-style filesystem functions if file_get_contents() will due the job due to smarter memory mapping)... But I also know when these are misleading.
For instance, calling explode() a thousand times can actually be slower than clever re-use of regular expressions.
regexes are still normally the wrong tool for the job, but they're not as fast as the manual makes out. You can use regexes hundreds of times in the time it takes to do one DOMDocument->LoadHTML() - but then once the DOM is loaded, if you're going to select a few tens of thousands of elements, it becomes faster than regexes again. Likewise, file_get_contents() is actually often (usually?) SLOWER than fopen() and company, at least in php5.2 - although you should still use file_get_contents() just because it's easier to actually read. (and is less verbose)

I know how to write code that executes reasonably efficiently (make use of the references!), and I know how to write code which parses quickly (make use of single quotes!), but I don't yet know what's happening on the symbol table for example, and I haven't read much of PHP's C source to REALLY understand what's happening.

I came to PHP quite accidentally from the web, and now more and more often I am finding myself using it on the desktop with the cli sapi - usually just as a regular terminal app. Sometimes with QT, sometimes with GTK (this is about learning)... I've tried ncurses but I'm not a huge fan. I think it wold grow on me in time though.

Well, there's my life story.
You won't read :P but maybe I can come back and check my progress later.

I've said enough that some of it is bound to be naive ;)
SneakyWhoami is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 09:39 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design