php framework comparison - performance comparisons

I am writing this post regarding PHP framework performance comparisons. There are lots of PHP frameworks available and every framework has its own advantages and disadvantages. As all frameworks are based on MVC and thus adopting any of them for product development is not that difficult. Normally developers check for no of libraries load time and some important features like ORM. Also you can check that which framework supports which php version.

Here is a simple chart which programmers can use while choosing the suitable framework for their projects.



phpframeworks[.]com also have explained this thing in detail. You can check that also.

Jquery plugin to read query string - how to

If you are looking for some jQuery plugin to read the query string parameters then you are on right page. Here is a simple function which will help you to understand how to detect/read the values of query string parameters.

Jquery Plugin

$.queryParam = function(name){

var answer = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(window.location.href);

if (!answer)
{
return 0;
}
return answer[1] || 0;
}


How to use
var paramValue = $.queryParam('paramName');

get X days back date from current date

How to get 7(X) days back date from current date?

PHP is very strong server side programming language which simplifies lots of small small tasks like converting date formats etc.

I was working on some task, where I was suppose to get 7 days back date from current date. Actually the task is very simple, I am sharing the code here. Have a look at it and let me know if any one can find better way than this.


$format = 'YmdhIS'; // YOU CAN USE ANY FORMAT WHICH YOU WANT

$date = date ( $format );

// - 7 days from today
$prevDate = date ( $format, strtotime ( '-7 day' . $date ) );

Note: If you want to get yesterdays date then simply do -1 instead of -7.

How to get 7(X) months back month from current month?

// - 7 months from today
$prevDate = date ( $format, strtotime ( '-7 month' . $date ) );

Its so simple.

Share this post with your friends