hinom 5 Denunciar post Postado Outubro 23, 2008 Exercise 20 Which of the following variable declarations within a class is invalid in PHP5? A. private $type = 'moderate'; B. var $term = 3; C. public $amnt = '500'; D. protected $name = 'Quantas Private Limited'; Compartilhar este post Link para o post Compartilhar em outros sites
hinom 5 Denunciar post Postado Outubro 23, 2008 Answer: B Explanation The PHP 4 method of declaring a variable with the var keyword is still supported for compatibility reasons (as a synonym for the public keyword). In PHP 5 before 5.1.3, its usage would generate an E_STRICT warning. http://php.net/manual/language.oop5.visibility.php Compartilhar este post Link para o post Compartilhar em outros sites