RIP Silex

I’ve been using silex for almost 2 years now, I’ve used from unstable to stable version.

All I can say Silex is one of great lightweight PHP frameworks I’ve ever used.

But sad to say,  its end of life is set to June 2018 🙁

It’s Ok cause symfony devs offers symfony 4 and they stated it that Symfony 4 and Flex It’s like using Silex and feels as lightweight as using Silex.

Also the current stable version of silex still maintained for bugs and security issues.

So we can still use it 🙂

See full post from posted by Fabien Potencier

PHP: Booleans

Before I usually used other method to check if the array has value or non empty array (true or false)


if (is_array($arr) && count($arr) > 0) {

To shorten this if you need need to check if array has value then you can just simply to like this:

if ($arr) {

non empty array always return true else false.

but be careful take note, in PHP

0  = false

-1 = negative values are always true

see below guide lines

var_dump((bool) "");        // bool(false)
var_dump((bool) 1);         // bool(true)
var_dump((bool) -2);        // bool(true)
var_dump((bool) "foo");     // bool(true)
var_dump((bool) 2.3e5);     // bool(true)
var_dump((bool) array(12)); // bool(true)
var_dump((bool) array());   // bool(false)
var_dump((bool) "false");   // bool(true)