From 6c40af3015c246d80403af781da08a7c2a791c55 Mon Sep 17 00:00:00 2001 From: Rafal Kupiec Date: Tue, 17 Jul 2018 11:28:33 +0200 Subject: [PATCH] Update page 'P# 1.0 Draft Specification' --- P%23-1.0-Draft-Specification.md | 46 +++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/P%23-1.0-Draft-Specification.md b/P%23-1.0-Draft-Specification.md index 131f130..a4c3157 100644 --- a/P%23-1.0-Draft-Specification.md +++ b/P%23-1.0-Draft-Specification.md @@ -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.