amarkal /
amarkal-ui
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * This file is used to manually include all required PHP files. If you are |
||
| 4 | * using composer as your dependency manager, you do not need to include this |
||
| 5 | * file as composer will include all neccessary files automatically. |
||
| 6 | */ |
||
| 7 | |||
| 8 | // Prevent direct file access |
||
| 9 | defined( 'ABSPATH' ) or die( 'No script kiddies please!' ); |
||
|
0 ignored issues
–
show
|
|||
| 10 | |||
| 11 | /** |
||
| 12 | * Load module functions. If this amarkal module has not been loaded, |
||
| 13 | * functions.php will not return false. |
||
| 14 | */ |
||
| 15 | if(false !== require_once 'functions.php') |
||
| 16 | { |
||
| 17 | // Load required classes if not using composer |
||
| 18 | require_once 'Renderer.php'; |
||
| 19 | require_once 'AbstractController.php'; |
||
| 20 | require_once 'AbstractComponent.php'; |
||
| 21 | } |
PHP has two types of connecting operators (logical operators, and boolean operators):
and&&or||The difference between these is the order in which they are executed. In most cases, you would want to use a boolean operator like
&&, or||.Let’s take a look at a few examples:
Logical Operators are used for Control-Flow
One case where you explicitly want to use logical operators is for control-flow such as this:
Since
dieintroduces problems of its own, f.e. it makes our code hardly testable, and prevents any kind of more sophisticated error handling; you probably do not want to use this in real-world code. Unfortunately, logical operators cannot be combined withthrowat this point:These limitations lead to logical operators rarely being of use in current PHP code.