Archive for April 2010

Post Archives
Archive for April, 2010

PHP conditional include statement parsing

April 7th, 2010 1 comment

I’m writing some PHP and using include statements as is pretty common.  When using conditional includes in my code I wasn’t quite sure whether the content of the included file is included regardless and then ignored or is only included conditionally (which of course would be the better option from a memory consumption perspective and so on), so I set out to find some info about PHP conditional includes, but surprisingly it wasn’t so easy to find.

I’ve finally managed to come across this PHP Include article that confirm what I was hoping for and also something that I didn’t know.  Apparently when an include is conditional, the content won’t be included if the condition evaluates to false, while if you use a require the content will be included but will not execute.  The last statement seems a little weird since I would expect that if logic is used to work out the source for the require statement that source might not exectute because it’s inside the conditional block, but that may be the exception.

Anways, it’s good to know that files which are conditionally included won’t get parsed.

Categories: PHP Tags:

Choosing the best PHP MVC Framework – Part 1

April 6th, 2010 15 comments

So, perhaps like me you are writing a fair bit of PHP and building some serious PHP apps.  Perhaps like me you have also decided that re-inventing the wheel for every app you write doesn’t make much sense and PHP by itself isn’t quite at a high enough level to be considered a framework.  I mean PHP is nice and all and there are fast ways to do many things in PHP, but there are far too many ways to do things in PHP and all you need is just one that works.  So having come to this realisation you decide that what you need is a PHP MVC Framework.   Read more…

Categories: PHP MVC Frameworks Tags:

Welcome

April 3rd, 2010 No comments

Welcome to my blog.   I’ve been rather slack with creating a blog, most probabably because I’ve always been a bit too busy with work and so on, but lately I’ve been finding that I’m reading blogs more and more and have some opinions that others may find very useful.  For example comparing different CMSes, comparing different programming languages such as PHP and ASP.NET, comparing different PHP IDEs, comparing different PHP frameworks such as Yii vs Kohana or components such as LinqToSql vs LinqToEntities vs NHibernate, comparing different CMSes like Drupal vs Joomla vs DotNetNuke vs WordPress and so on.

This is stuff that I’m doing anyway and do have a fair bit of experience with, so I figured why not share it with others as if not for other people’s blogs I would have found some of this far more difficult.  I also found that many blog posts were outdated or don’t consider all aspects that I’m interested in which I think other people would also find interesting.

So, now that I have a blog I’ll be able to post some of my research and hopefully make other people’s lives who are trying to do the same research a little easier.

Categories: Personal Tags: