Codeigniter 3 new realease – PHP framework

There is no doubt that CodeIgniter is a powerful PHP framework. It comes with a small footprint, however it built for developers who need a powerful toolkit to create full-featured web applications. Codeigniter is a very easy to understand for php framerwork learner.

CODEIGNITER 3 VERSION RELEASEEllisLab planned to release CodeIgniter 3 under the Open Software License 3 (OSL3).
General Changes in new Codeigniter 3 will be :

  • PHP 5.1.6 is no longer supported. CodeIgniter now requires PHP 5.2.4 and recommends PHP 5.4+ or newer to be used.
  • Changed filenaming convention (class file names now must be Ucfirst and everything else in lowercase).
  • Changed the default database driver to ‘mysqli’ (the old ‘mysql’ driver is DEPRECATED).
  • $_SERVER['CI_ENV'] can now be set to control the ENVIRONMENT constant.
  • Added an optional backtrace to php-error template.
  • Added Android to the list of user agents.
  • Added Windows 7, Windows 8, Windows 8.1, Android, Blackberry, iOS and PlayStation 3 to the list of user platforms.
  • Added Fennec (Firefox for mobile) to the list of mobile user agents.
  • Ability to log certain error types, not all under a threshold.
  • Added support for pem, p10, p12, p7a, p7c, p7m, p7r, p7s, crt, crl, der, kdb, rsa, cer, sst, csr Certs to mimes.php.
  • Added support for pgp, gpg, zsh and cdr files to mimes.php.
  • Added support for 3gp, 3g2, mp4, wmv, f4v, vlc Video files to mimes.php.
  • Added support for m4a, aac, m4u, xspf, au, ac3, flac, ogg, wma Audio files to mimes.php.
  • Added support for kmz and kml (Google Earth) files to mimes.php.
  • Added support for ics Calendar files to mimes.php.
  • Added support for rar, jar and 7zip archives to mimes.php.
  • Updated support for xml (‘application/xml’) and xsl (‘application/xml’, ‘text/xsl’) files in mimes.php.
  • Updated support for doc files in mimes.php.
  • Updated support for docx files in mimes.php.
  • Updated support for php files in mimes.php.
  • Updated support for zip files in mimes.php.
  • Updated support for csv files in mimes.php.
  • Added Romanian, Greek, Vietnamese and Cyrilic characters in application/config/foreign_characters.php.
  • Changed logger to only chmod when file is first created.
  • Removed previously deprecated SHA1 Library.
  • Removed previously deprecated use of $autoload['core'] in application/config/autoload.php. Only entries in $autoload['libraries'] are auto-loaded now.
  • Removed previously deprecated EXT constant.
  • Updated all classes to be written in PHP 5 style, with visibility declarations and no var usage for properties.
  • Added an Exception handler.
  • Moved error templates to application/views/errors/ and made the path configurable via $config['error_views_path'].
  • Added support non-HTML error templates for CLI applications.
  • Moved the Log class to application/core/
  • Global config files are loaded first, then environment ones. Environment config keys overwrite base ones, allowing to only set the keys we want changed per environment.
  • Changed detection of $view_folder so that if it’s not found in the current path, it will now also be searched for under the application folder.
  • Path constants BASEPATH, APPPATH and VIEWPATH are now (internally) defined as absolute paths.
  • Updated email validation methods to use filter_var() instead of PCRE.
  • Changed environment defaults to report all errors in development and only fatal ones in testing, production but only display them in development.
  • Updated ip_address database field lengths from 16 to 45 for supporting IPv6 address on Trackback Library and Captcha Helper.
  • Removed cheatsheets and quick_reference PDFs from the documentation.
  • Added availability checks where usage of dangerous functions like eval() and exec() is required.
  • Added support for changing the file extension of log files using $config['log_file_extension'].
  • Added support for turning newline standardization on/off via $config['standardize_newlines'] and set it to FALSE by default.
  • Added configuration setting $config['composer_autoload'] to enable loading of a Composer auto-loader.
  • Removed the automatic conversion of ‘programmatic characters’ to HTML entities from the URI Library.
  • Changed log messages that say a class or file was loaded to “info” level instead of “debug”, so that they don’t pollute log files when $config['log_threshold'] is set to 2 (debug).

For more detail please visit at

how to use and save php array in cookie using serialize and unserialize

Hello friends,

As an php developer , many times you may need to store php array in cookies. Am i right ?

If you are creating any shopping cart, then you may have requirement to store billing and shipping address in cookies.  To minimize code we like to store billling and shipping address in array. But you may have face problem about how to store php array in cookies. I had also felt same problem. After spend some times, i have founded a very easy steps. Perhaps you may like it.  Many of you had already tried serialize and unserialize php array  in cookies, but may be failure to get perfect results.

How to store php array in cookies :

setcookie(‘mycookiename’, serialize($array) ); 

Just convert php array into serialize as above to store in cookie

To get back php array from cookie, just use given below code

$data = $_COOKIE[‘mycookiename’];
$data= html_entity_decode($data);    // Important
$myarray= unserialize($data);

Output of $myarray and $phparray will be same. You dont require jsonencode or decode. 

Is it not easy solutions ? !!



Zendframework 2 : how to define global custom functions easily

Hello Friends,

As we know that zendframework 2 is not very easy to learn or understand.  Its true that its 100% pure OOPS. But for beginner it may create problem to understand it. It is not easy compare to ZF1 (Zendframework 1) initially. Zendframework 1 work was easy to understand, but now in zendframework2 it is completely different acrchitecture.  Now load speed is minimized in zendframework 2. But problem for beginner is to implement code.  I am also learning zendframework 2 and founded that it sometimes take more time to code. I

Custom functions

Suppose if you want to use your own custom functions then it is required to updated module.php and other files.    But i have an other short cut using which you can use your own functions very easily. And also you will not required to write anything in module.php, controller or module file. Even you dont need to use namespace or  dont need to use php function ‘Use’ .

Steps to create custom functions in zendframework 2

Step-1 : Just create one file say in  autoload directly. and write your function in normal way

Step -2: At last in this file, you just need to write blank array like following.

Example :

function plus($v1,$v2)

return $v1+$v2;


return array();      // dont forget to write this

That’s it.

Now you just use function name in your model, controller or module in simple way like you were used in core coding. I know that perhaps this is not write way. But to do some task, i think this is very short cut.

Am i right ?





which php framework is best


Hello Friends,

There are so many php developers that are working on core coding and want to shift or want to try php framwork. But problem is that which framework is best for php and how to choose it ?. I am also php web developer and i also faced same problem. I just give you my opinion and experience of php framework.

First of all , i would like to tell that i like my core coding because i can do what i want. In php framework you need to understand all things which are developed by framwork developer. No doubt, that if you work on php framework then your code will be in proper way. Because we have to follow its rules, class , model or function. You can use any php framework. Generally all php framwork are based on MVC (Model View Controller).

I have tried CODEIGNITOR, YII , CACKEPHP and ZEND FRAMEWORK2.   I think if you want easy php framework then you should go for codignitor, yii or cackephp. While zend framework2 seems some complex compare to others. However zendframework1 was easy. But i would recommend to go for zend framework2 because it will suppose mobile application too.  Zend framework 2 based on event manager. Initially you will feel hard but later on it will easy. At present i am still learning it but it becomes complex for me because i am lover of core coding and so.    I have also developed my own MVC, which seems very useful and also think to develop it to use in my coming project.  I have developed this MVC after review opencart shopping cart. I was so impress about its internal data flow and database structure.

So in general way you can follow any php framework which you like. In market there are following best php framework.

  1. CodeIgnitor
  2. CakePHP 
  3. Yii 
  4. CodeIgniter 
  5. Zend Framework-2 
  6. Symfony