Home >Backend Development >PHP Tutorial >PHP has doubts about assigning values ​​to class attributes

PHP has doubts about assigning values ​​to class attributes

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-07-29 08:55:271671browse

Test code:

<code><span><span><?php</span><span>$a</span> = <span>new</span> controller;
<span>$a</span>->test();

<span><span>class</span><span>controller</span>{</span><span>public</span><span>$menuList</span> = time();
    <span>public</span><span><span>function</span><span>test</span><span>()</span>{</span><span>echo</span><span>$this</span>->menuList;
    }
}
<span>?></span></span></span></code>

This will report an error, why

').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

The above introduces PHP’s doubts about class attribute assignment, including the content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn