TURK GUZELI – BOOK YOUR BEAUTY
TURK GUZELI – BOOK YOUR BEAUTY SESSION ONLINE IN TURKEY

APP Available only in Turkey .
Development : Naro Dev








No products in the cart.
Pneu Service Dz – Vente En Ligne Des Pneus
Development : Naro Dev
Garphics : Graphéin
A Narodev Creation :
– Amine G –
– Ilyes A –
– Mohammed .N.B –
It happens to the best: some script rockets to the skyline resulting in an instand system administrator headache because some folder – typically, sessions – was stuffed with millions of files. Linux is not quite happy with that, deleting the folder is not an option and the loyal “rm -rf” command decides to call it a day. To make things even worse: you want to remove only files of some days ago… what are the options?
The Linux “find” command is a possible solution, many will go for:
find /yourmagicmap/* -type f -mtime +3 -exec rm -f {} \;
The command above will give a list of files older than 3 days and will pass each found file to the rm command. The rule above has one problem though: it will take some time, since calling the rm command a million times is not exactly what you can call efficient.
A better option is:
find /yourmagicmap/* -type f -mtime +3 -delete
This adds the delete flag to the find command giving it the command to throw it all away. Do the right thing and pass along your command in a cronjob if you need to clean out the folder on a regular basis.
rsync
is without doubt one of the most handy commands when it comes to file
operations. Rsync can do any kind of volume sync – as you may know – but
it also provides a way to empty a folder.
The example below assumes
you have a folder named /tmp/empty/ which contains no files, and a
folder /tmp/session/ that contains too much crap. The rule below allows
you to remove those files:
rsync -a --delete /tmp/empty /tmp/session/
rm: deleting millions of file is a no-can-do!
find -exec: an option, but slower!
find -delete: fast and easy way to remove loads of files.
rsync –delete: without doubt the quickest!
A simple performance comparison of 6 PHP MVC style frameworks using PHP 7.1.
I used a minimal installation of PHP and Apache with no additional configurations or sever settings changed.
The benchmark tool kit executes a simple “hello world”, it does this with the frameworks minimal settings, no database, no debugging and if possible, no template engine.
Read more about the testing on the benchmark tool kits page.
Out of the 6 frameworks tested Codeigniter 3 produced the most requests per second and the least memory usage. Zend Framework 2.5 produced the least requests per second and Laravel 5.3 produced the most memory usage.
No framework: 7,094 requests per second, .34M memory.
Codeigniter 3: 2,245 requests per second, .38M memory.
Lumen 5.3: 1,543 requests per second, .63M memory.
Fuel 1.8: 1,033 requests per second, .60M memory.
Symfony 3.0: 551 requests per second, 1.52M memory.
Laravel 5.3: 331 requests per second, 1.53M memory
Zend 2.5: 291 requests per second, 1.34M memory
Compared to PHP 7.0 we see close to 2,000 more requests per second with no framework along with a considerable increase for Codeigniter 3.
Codeigiter produces the most requests per seconds. Lumen and Fuel perform decently well but the rest of the frameworks produced very low results.
Codeigniter consumes the least amount of memory. Lumen and Fuel come in under 1M but Laravel, Symfony and Zend consume more then double the memory of the other frameworks.
Laravel and Zend take the longest time to execute with Symfony close behind. Fuel and Lumen are the fastest and Codeigniter has fallen to 3rd place.
Codeigniter, Lumen and Fuel remain the top 3 frameworks that include the least files. Symfony is loading less files while Laravel has appeared to doubled the amount of included files.
We see most frameworks have improved requests per second. Laravel has moved up one spot and all frameworks serve more requests then before.
Almost all the frameworks utilize less memory. In the case of Laravel and Symfony we see memory usage now under 2M.
No time but eager to hear PHP news? PHP 7.3 is out in December 2018 and it brings 173 changes. Which are the most useful ones?
From features that might be the most interesting to those lesser ones, that anybody will rarely use.
1. Comma After the Last Argument
Do you know this?
$array = [ 1, + 2, ];
We’ll be able to do this:
$this->someFunction( $arg, + $arg2, );
But still not this:
function someFunction( $arg, + $arg2, ) {}
Thanks Jacob for pointing this difference out.
25 seconds to go…
2. First and Last Array Key
$items = [ 1 => 'a', 2 => 'b', ]; -reset($items); -$firstKey = key($items); +$firstKey = array_key_first($items); var_dump($firstKey); // 1
$items = [ 1 => 'a', 2 => 'b', ]; -end($items); -$lastKey = key($items); +$lastKey = array_key_last($items); var_dump($lastKey); // 2
These will be handy in coding standard tools.
Still 15 seconds…
3. Countable for Risky Variables
I don’t think having a variable of 2 forms is a good idea:
<?php $items = null; // same as "private $items;" in a class echo sprintf('There is %d items', count($items)); // error Warning: count(): Parameter must be an array or an object that implements Countable
But in case of that smelly (3rd party) code, there is a help:
$items = null; +if (is_countable($items)) { -echo sprintf('There is %d items', count($items)); + echo sprintf('There is %d items', count($items)); +}
Only 5 seconds, hurry!
4. Safer JSON Parsing
-json_encode($data); +json_encode($data, JSON_THROW_ON_ERROR);
-json_decode($json); +json_decode($json, null, null, JSON_THROW_ON_ERROR);
So you’ll be able to do:
try { return json_decode($json, null, null, JSON_THROW_ON_ERROR); } catch (JsonException $exception) { // ... }
I’ve used similar technique for years thanks to Nette\Utils and I’ve never complained:
<?php try { return Nette\Utils\Json::encode($value); } catch (Nette\Utils\JsonException $exception) { // ... }
…0, you made it! Congrats, now get back to pwning the world!
Did I miss a feature you plan to use from day 1 of your PHP 7.3? I might too, drop it in the comments!