Open source general purpose
0 Comments
Slower
Program or sequence of instruction that is interpreted or carried out by another program class my_class
{ function my_funct ($my_param) { user_error ("Please define me", E_ERROR); } function b() { return 10; } } A. Multiple inheritance B. Interfaces C. Abstract methods D. Private methods E. Function overloading Answer: Abstract methods A. Model-view-controller
B. Abstract factory C. Singleton D. Proxy E. State Answer: Singleton class my_class
{ var $my_value = array(); function my_class ($value) { $this->my_value[] = $value; } function set_value ($value) { $this->$my_value = $value; } } $a = new my_class ('a'); $a->my_value[] = 'b'; $a->set_value ('c'); $a->my_class('d');
b,a and d The set_value method of my_class will not work correctly because it uses the expression $this->$my_value, which is a “variable variable” that, under the circumstances will never correspond to any real property of the class.
False
mktime()
Embedded, Zend, HTML, XML |