PHP5. Two ways of declaring an array as a class member

后端 未结 4 1394
猫巷女王i
猫巷女王i 2021-02-07 00:43

When declaring an array as a class member, which way should it be done?

class Test1 {
    private $paths = array();

    public function __construct() {
                 


        
4条回答
  •  盖世英雄少女心
    2021-02-07 01:10

    There are no performance implications. Stop obsessing over things that don't matter - concentrate on performance problems that ARE there: measure first, optimize only the top offenders.

提交回复
热议问题