Enabling 'strict_types' globally in PHP 7

前端 未结 3 1977
北海茫月
北海茫月 2020-11-30 13:50

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

3条回答
  •  悲&欢浪女
    2020-11-30 14:22

    Essentially no.

    Because if you only require libraries that used strict mode you will cause an unnecessary separation of packages. Also consider the strict/weak types option is just an extra in PHP.

提交回复
热议问题