DB Basics Let’s talk about some of the basics first. float vs decimal In general, floating-point values are usually stored as float in the database. In earlier versions of databases they also often had precision/scale (e.g. float(5,2) for values like…
Tag: PHP
Keeping up with framework upgrades
If you use open-source software, you might wonder, why all those changes and why you should migrate up to the next major versions. Some don’t even (properly) migrate the minor version of the framework dependency to the latest available release…
Leverage your IDE
Using the example of PhpStorm 2020.1 and a state-of-the-art CakePHP 4 app. Preliminary remarks The following ideally should adhere to any IDE and framework. I just can’t verify and confirm them all, thus the selection at hand. Please be so…
Test composer dependencies with prefer-lowest
This 4 year old post already blogged about it. Surprisingly many libraries still don’t use it in their CI system yet. The –prefer-lowest option has been added around that time. Composer documentation says: "Useful for testing minimal versions of requirements"….
Return null vs return void
The other day I had a discussion about that, and why important open source frameworks like CakePHP use void in @return doc tags when void and null are code-wise totally identical. So here my reasoning why it is a good…
UTF8 can be tricky – especially with PHP
Everybody uses (or should!) UTF8 these days. An easy and fully supporting PHP version I did not come across yet, though. It seems there is sometimes more to it. This article is supposed to guideline the basic setup of a…
Interesting (CakePHP/PHP) links – 2013
PHP5.5 Try/Catch/Finally is a nice article about upcoming 5.5 features – and how to use them wisely. Enhance your select form fields Chosen is a beautiful addon for your select dropdowns, especially if you use them to filter to search…
CakePHP Tips
All new CakePHP tips collected over the last few weeks. Dispatcher execution order Tested on Cake2.3RC: APP/webroot/index.php CORE/bootstrap.php APP/Config/core.php APP/Config/bootstrap.php dispatchers defined in CORE bootstrap APP/Config/routes.php APP/Config/database.php controller and all the rest It is important to know that the dispatchers…