php get link from atom feed
Updated: 26th May 2023Tags: php
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
PHP server in current directory
php -S localhost:8000
PHP server in public directory
php -S localhost:8000 -t public
$randomRow = DB::table('table')
->inRandomOrder()
->first();
$randomId = DB::table('table')
->inRandomOrder()
->value('id');
After installing laravel you MUST change some folder permissions.
sudo chmod 755 -R laravel_app
sudo chmod -R o+w laravel_app/storage
sudo chmod -R o+w laravel_app/bootstrap/cache