-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathtraits.yaml
68 lines (68 loc) · 3.26 KB
/
traits.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
questions:
-
uuid: 1eebf878-8ba8-6fe6-bdab-99d84c92580c
question: 'Is it possible to instantiate a Trait on its own ?'
answers:
- { value: 'Yes', correct: false }
- { value: 'No', correct: true }
help: 'https://www.php.net/manual/en/language.oop5.traits.php'
-
uuid: 1eebf878-8ba9-6108-8a3b-99d84c92580c
question: "To resolve naming conflicts between Traits used in the same class, what's the operator needed to be used to choose exactly one of the conflicting methods ?"
answers:
- { value: as, correct: false }
- { value: for, correct: false }
- { value: insteadof, correct: true }
- { value: asAlias, correct: false }
help: 'https://www.php.net/manual/en/language.oop5.traits.php#language.oop5.traits.conflict'
-
uuid: 1eebf878-8ba9-6194-80af-99d84c92580c
question: 'What syntax could you use to adjust the visibility of a method in a Trait ?'
answers:
- { value: insteadof, correct: false }
- { value: 'visible as', correct: false }
- { value: overridedby, correct: false }
- { value: as, correct: true }
help: 'https://www.php.net/manual/en/language.oop5.traits.php#language.oop5.traits.visibility'
-
uuid: 1eebf878-8ba9-61da-91cd-99d84c92580c
question: 'Which method are supported as abstract function in a Trait before PHP 8.0.0 ?'
answers:
- { value: public, correct: true }
- { value: private, correct: false }
- { value: protected, correct: true }
- { value: deffered, correct: false }
help: 'https://www.php.net/manual/en/language.oop5.traits.php#language.oop5.traits.abstract'
-
uuid: 1eebf878-8ba9-6220-a6f6-99d84c92580c
question: 'Does Traits support the use of abstract methods inside their definition ?'
answers:
- { value: 'Yes', correct: true }
- { value: 'No', correct: false }
help: 'https://www.php.net/manual/en/language.oop5.traits.php#language.oop5.traits.abstract'
-
uuid: 1eebf878-8ba9-6270-9168-99d84c92580c
question: 'Traits do not support the definition of static methods or static properties, correct?'
answers:
- { value: 'Yes', correct: false }
- { value: 'No', correct: true }
help: 'https://www.php.net/manual/en/language.oop5.traits.php#language.oop5.traits.static'
-
uuid: 1eebf878-8ba9-634c-83eb-99d84c92580c
question: 'From which version a Constant can be defined in a Trait ?'
answers:
- { value: '7.4', correct: false }
- { value: '7.7', correct: false }
- { value: '7.9', correct: false }
- { value: '8.0', correct: false }
- { value: '8.1', correct: false }
- { value: '8.2', correct: true }
help: 'https://www.php.net/manual/en/language.oop5.traits.php#language.oop5.traits.constants'
-
uuid: 1eebf878-8ba9-6392-a88a-99d84c92580c
question: 'Can a constant defined in a trait be overridden by a class that uses that trait?'
answers:
- { value: 'No, the class will inherit the constant value from the trait.', correct: false }
- { value: "Yes, the class can define its own constant that overrides the trait's constant.", correct: false }
- { value: 'No it will render a Fatal Error', correct: true }
help: 'https://www.php.net/manual/en/language.oop5.traits.php#language.oop5.traits.constants'