I'm currently migrating my website from PHP5 to PHP7, and I've started using the strict typing feature that was added. However this requires me to begin all files with the following line:
<?php declare(strict_types=1);
// All other code here
// ...
So I was wondering, is there any way to enable strict_types
globally using something like php.ini
or the apache configuration file so I don't have to write this line every time, and if so how could I enable this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…