Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.
I have a lot of methods in my templates that have names such as:
AddJavascript
AddStyle
AddHeader
AddMeta
I have corresponding methods for parsing these things:
ParseJavascript
ParseStyle
ParseHeader
ParseMeta
When it comes time to parse the arrays that hold the data and turn them into blocks to be inserted into the template to create the view i do not want to have to type these things out 800000000 times so I want to do something like:
"boring" is hardly a justifiable reason to ignore a possibly more efficient method.
Reflection is also more 'fun' in my opinion.. unless you like spending ages tweaking a parser.. (btw - just how would tokenizer work in this scenario?)
Jenk wrote:"boring" is hardly a justifiable reason to ignore a possibly more efficient method.
Reflection is also more 'fun' in my opinion.. unless you like spending ages tweaking a parser.. (btw - just how would tokenizer work in this scenario?)
hehe... it was meant as a joke - in real live i would never ever touch a tokenizer for this type of "problems"
What would be the fastest way to find the string "parse" in another string? String functions or Regular Expressions? Might one string function be faster than another?