programmieren:grundlagen:logical_operators
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| programmieren:grundlagen:logical_operators [2026/11/11 16:34] – [Logical] admin | programmieren:grundlagen:logical_operators [2026/11/12 16:36] (current) – Added Types and Array admin | ||
|---|---|---|---|
| Line 248: | Line 248: | ||
| </ | </ | ||
| + | ===== String ===== | ||
| - | I should totally expand this list | + | <code php> |
| + | |||
| + | // Concatenation | ||
| + | |||
| + | $a = ' | ||
| + | $b = ' | ||
| + | |||
| + | $a = $a . $b; // $a = ' | ||
| + | |||
| + | // Assignment | ||
| + | |||
| + | $a .= $b; // $a = ' | ||
| + | |||
| + | </ | ||
| + | |||
| + | ===== 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.1794411252.txt.gz · Last modified: by admin
