@@ 44-57 (lines=14) @@ | ||
41 | AbcRef::values(); |
|
42 | } |
|
43 | ||
44 | public function benchReflectionEnumNoMagic() |
|
45 | { |
|
46 | $d = DefRef::byValue(DefRef::D); |
|
47 | $d->equals(DefRef::byValue(DefRef::D)); |
|
48 | ||
49 | $e = DefRef::byValue(DefRef::E); |
|
50 | $e->equals(DefRef::byValue(DefRef::D)); |
|
51 | ||
52 | $f = DefRef::byValue(DefRef::F); |
|
53 | $z = (string) $f; |
|
54 | ||
55 | DefRef::choices(); |
|
56 | DefRef::values(); |
|
57 | } |
|
58 | ||
59 | public function benchExplicitEnum() |
|
60 | { |
|
@@ 59-72 (lines=14) @@ | ||
56 | DefRef::values(); |
|
57 | } |
|
58 | ||
59 | public function benchExplicitEnum() |
|
60 | { |
|
61 | $a = AbcExp::byValue(AbcExp::A); |
|
62 | $a->equals(AbcExp::byValue(AbcExp::A)); |
|
63 | ||
64 | $b = AbcExp::byValue(AbcExp::B); |
|
65 | $b->equals(AbcExp::byValue(AbcExp::A)); |
|
66 | ||
67 | $c = AbcExp::byValue(AbcExp::C); |
|
68 | $e = (string) $c; |
|
69 | ||
70 | AbcExp::choices(); |
|
71 | AbcExp::values(); |
|
72 | } |
|
73 | ||
74 | public function benchMyCLabsEnum() |
|
75 | { |
|
@@ 104-117 (lines=14) @@ | ||
101 | AbcMarcMabe::values(); |
|
102 | } |
|
103 | ||
104 | public function benchMabeNoMagicEnum() |
|
105 | { |
|
106 | $d = DefMarcMabe::byValue(DefMarcMabe::D); |
|
107 | $d->is(DefMarcMabe::byValue(DefMarcMabe::D)); |
|
108 | ||
109 | $e = DefMarcMabe::byValue(DefMarcMabe::E); |
|
110 | $e->is(DefMarcMabe::byValue(DefMarcMabe::D)); |
|
111 | ||
112 | $f = DefMarcMabe::byValue(DefMarcMabe::F); |
|
113 | $z = (string) $f; |
|
114 | ||
115 | DefMarcMabe::choices(); |
|
116 | DefMarcMabe::values(); |
|
117 | } |
|
118 | ||
119 | public function benchHappyTypesEnum() |
|
120 | { |