My name is Kevin Nadin - @kevinjhappy
I work at Darkmira, a company full of good guys like you, and you, and.... hum not you...
I'm a backend developer using PHP / Zend Framework
My dream is to rule the world, and so should be yours
100% performance gain
Lower memory usages
So, by cutting CPU Usages by half
600 servers for Badoo => 300 servers, therefore 1M$ of saving (4k each + 100k hosting per year)
Bonus: the cloud also have a boost perf !
test_ifelse : 0.354 s
test_math : 0.918 s
test_loops : 0.624 s
test_stringmanipulation : 0.874 s
test_ifelse : 0.167 s
test_math : 0.247 s
test_loops : 0.210 s
test_stringmanipulation : 0.319 s
Only 5% of website
not even a 1/4 million servers
This message is powered by ©The Earth Ltd.
Legacy stand for :
"Old and unmaintainable code we keep because it works and provides 90% of the company revenue"
Love this tweet :D
// PHP 5.6
$dbConnect = mysql_connect('HOST', 'USER', 'PASS');
mysql_query($request);
// in PHP 7 it is deprecated
$dbConnect = mysqli_connect('HOST', 'USER', 'PASS');
mysqli_query($dbConnect, $request);
//don't forget to add $dbConnect as first parameter of mysqli functions
My tips: mysql_connect... no more !
// PHP 5.6 without Autoloader
// Using the Excel library php_writeexcel
require_once "../.include/php_writeexcel/class.writeexcel_workbook.inc.php";
require_once "../.include/php_writeexcel/class.writeexcel_worksheet.inc.php";
require_once "../.include/php_writeexcel/class.writeexcel_workbookbig.inc.php";
$workbook = new writeexcel_workbookbig($filename);
// in PHP 7 php_writeexcel doesn't work
// and still no autoloader
// Migrating to Excel library Box/Spout
require_once '../.include/spout/src/Spout/Autoloader/autoload.php';
$writer = WriterFactory::create(Type::XLSX);
Check for compatibility on Library
Composer can be installed on Legacy without today's code structure using classmap
It can load all .php and .inc files it will find
Yes, I assure you !
I do !
I think...
...
Yeah it is great :)
(I'm not paid to say this so you can trust me)
function fn(int $x) {
return 2;
}
Rewrite to :
I recommend this awesome talk :
Réécriture de code vieux de 17 ans -
Anna Filina - Forum PHP 2017
Please add a Youtube view at my talk :D
La génération de dates en PHP -
Kevin Nadin - Forum PHP 2017