As I mentioned here, I have been re-learning PHP as part of a personal project based on WordpPress. Last night, I was working on some more updates and customizations and I realized that some of what I was typing was exactly the same syntax I would use for ColdFusion (the only difference was the variable name, all I would have to do is remove the '$' from the PHP code).
This got me thinking..maybe PHP and ColdFusion are really not all that different. It also made me think of the idea for 'A Tale of Two Languages'. My thought is not to have a 'my language is better than your language' debate, but to show how you would/could accomplish common tasks using each language (ideally, I would like to use other languages as well, but for now I am taking 'baby steps' and using the languages of which I am most familiar).
I plan on starting simple, and, over time, working my way up to more complex tasks. I am going to use this as an opportunity to become more proficient in PHP so that I become more 'valuable' as a developer. I am fairly certain that this will make me a better ColdFusion developer as well.
I already have some ideas for the first post or two but would love to hear some suggestions on what I can cover. Please leave a comment or use the contact form if there is something you would like to see me demonstrate.
Look for the first post in the 'series' sometime next week.
Disclaimer:I use the word 'series' loosely. I do not plan to have a regular schedule for these postings, but I am hoping this will prove useful enough to others that I would kind of be forced to do so. I also understand that this stands to be a powder keg for a 'battle of the languages'.




9 comments
BTW, I think WordPress is a great learning tool for developers looking to get into complex PHP. It includes Classes, Security and "good" Code Reuse.
I knew a little PHP, had worked with some before. but last year I was immersed in it.
I found the Kohana MVC framework and it really led me to enjoying working in a PHP/Kohana environment.
CF is my first love... and I've just found my way back. But as it is with CF frameworks... coding styles... finding a PHP framework that "felt good".. that fit... really helped me learn PHP and enjoy it.
I don't really consider myself a pro CF or pro PHP guy... but I do enjoy learning and trying new things...
I think overall... it does make one more "valuable" in some way.
Anyways.... looking forward to reading.
:-)
(and, the guys in the golf league have asked for some features that may require me to write my own WordPress plugins)
Oh, sorry, I didn't mean to read anything into the post there, just making suggestions as you asked. :)
Seriously, I've only looked at some PHP code here and there and definitely would like to see some simple things like the way a cfm page calls a cfc demonstrated in the PHP world.
$functionstack={} is a legal variable assignment.