How to add imagick to Docker alpine:latest without pecl
Updated: 19th July 2024Tags: php docker
Add whole directory of your app to windows defender Exclusions. You can also move your projects in project directory and add projects to exclusion.
Please, use integer as cents, don’t do my mistake, if you are using PHP.
I was shocked when discovered that php is using float and doesn’t have decimal. I have a lot of code already done, so I used bcmath to get around, but if I had known this earlier, I would have used integers.
echo date(DATE_RFC3339);
//convert from other format
echo date(DATE_RFC3339, strtotime('2023-01-01 05:55:55'));
Memcache. It allows you to store both strings and php arrays and have fun. If it is not enough, try redis.
Php isset will tell false if variable is null.
//false
isset($a[1]);
$a[1] = null;
//false
isset($a[1]);
That’s why you should use array_key_exists if you need to check if it is set or not.
//false
array_key_exists($a[1]);
$a[1] = null;
//true
array_key_exists($a[1]);
Laravel queue job is caching your job php code, so after updating job code you need to:
php artisan queue:restart