Update page 'P# 1.0 Draft Specification'
@@ -344,10 +344,52 @@ Unlike the standard PHP engine, the ternary operator under P# evaluates left-to-
|
||||
The above expression in PHP will output 't' and this is an unexpected result, but if the same code run using the P# will output 'true' as expected.
|
||||
|
||||
## 7. Flow Control
|
||||
TODO
|
||||
### 7.1. If Statement
|
||||
|
||||
### 7.2. Switch Statement
|
||||
|
||||
### 7.3. While Loop
|
||||
|
||||
### 7.4. Do-While Loop
|
||||
|
||||
### 7.5. For Loop
|
||||
|
||||
### 7.6. Foreach Loop
|
||||
|
||||
### 7.7. Break & Continue Statements
|
||||
|
||||
## 8. Object-Oriented Programming
|
||||
TODO
|
||||
### 8.1. Objects in P#
|
||||
|
||||
### 8.2. Object Attributes
|
||||
|
||||
### 8.3. Methods
|
||||
|
||||
### 8.4. Method Overloading
|
||||
|
||||
### 8.5. Constructors & Destructors
|
||||
|
||||
### 8.6. Constructor Overloading
|
||||
|
||||
### 8.7. Inheritance
|
||||
|
||||
### 8.8. Virtual Classes & Methods
|
||||
|
||||
### 8.9. Magic Methods
|
||||
|
||||
### 8.10. Access Modifiers
|
||||
|
||||
### 8.11. Class Constants
|
||||
|
||||
### 8.12. Static Keyword
|
||||
|
||||
### 8.13. Final Keyword
|
||||
|
||||
### 8.14. Instanceof Keyword
|
||||
|
||||
### 8.15. Interfaces
|
||||
|
||||
### 8.16. Exceptions
|
||||
|
||||
## 9. Anonymous Functions
|
||||
Anonymous functions, also known as closures, allow the creation of functions which have no specified name. In P#, anonymous function arguments can take a default value exactly like standard function arguments. The default value associated with the function argument can be any complex expression including function calls.
|
||||
|
||||
Reference in New Issue
Block a user