programmieren:grundlagen:logical_operators
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| programmieren:grundlagen:logical_operators [2026/11/12 16:22] – [String] admin | programmieren:grundlagen:logical_operators [2026/11/12 16:36] (current) – Added Types and Array admin | ||
|---|---|---|---|
| Line 258: | Line 258: | ||
| $a = $a . $b; // $a = ' | $a = $a . $b; // $a = ' | ||
| + | |||
| + | // Assignment | ||
| $a .= $b; // $a = ' | $a .= $b; // $a = ' | ||
| Line 263: | Line 265: | ||
| </ | </ | ||
| - | I should totally expand this list | + | ===== Array ===== |
| + | |||
| + | <code php> | ||
| + | // Union | ||
| + | |||
| + | $a = [" | ||
| + | $b = [" | ||
| + | |||
| + | $c = $a + $b; // $c = [" | ||
| + | </ | ||
| + | |||
| + | ===== Types ===== | ||
| + | |||
| + | <code php> | ||
| + | // instanceof | ||
| + | |||
| + | class ParentClass {} | ||
| + | class MyClass extends ParentClass {} | ||
| + | class NotMyClass {} | ||
| + | |||
| + | $a = new MyClass; | ||
| + | $b = new NotMyClass; | ||
| + | $c = new ParentClass; | ||
| + | |||
| + | $a instanceof MyClass // True | ||
| + | $a instanceof NotMyClass // False | ||
| + | $a instanceof ParentClass // True, works with any kind of inheritance | ||
| + | |||
| + | $b instanceof MyClass // False | ||
| + | $b instanceof NotMyClass // True | ||
| + | $b instanceof ParentClass // False | ||
| + | |||
| + | $c instanceof MyClass // False | ||
| + | $c instanceof NotMyClass // False | ||
| + | $c instanceof ParentClass // True | ||
| + | |||
| + | </ | ||
programmieren/grundlagen/logical_operators.txt · Last modified: by admin
