updates
This commit is contained in:
Родитель
aa70460c91
Коммит
a71345c759
|
@ -3,7 +3,7 @@
|
|||
The PeachPie project introduces set of supporting runtime APIs and specifications. The compiled PHP project respects the specifications and APIs which makes it usable and accessible across the .NET platform.
|
||||
|
||||
!!! info "Peachpie.Runtime"
|
||||
The compiled project depends on `Peachpie.Runtime.dll` module. This defines the language core types, semantic and API; all used by both the compiled project and any other .NET project.
|
||||
The compiled project depends on `Peachpie.Runtime.dll` module. This defines the language core types, the language semantic and APIs; all used by both the compiled project and possibly any other .NET project.
|
||||
|
||||
!!! info "Peachpie.Library"
|
||||
By default, any compiled project depends on `Peachpie.Library.dll` module. It contains a basic set of PHP functions, constants and types implemented in .NET.
|
||||
By default, any compiled project depends on `Peachpie.Library.dll` module. It contains a basic set of PHP functions, constants and types implemented in .NET.
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
The .NET languages support enums natively and the compiler provides an easy way of making use of them. However it is not possible to define `enum` in PHP code yet nor perform `Enum.ToString()` conversion.
|
||||
|
||||
## Using `enum` in PHP code
|
||||
|
||||
Within the context of PHP code `enum` looks like a final class with class constats. Thereby its usage from PHP code is accordant.
|
||||
|
||||
*C# code:*
|
||||
|
@ -18,8 +19,11 @@ public enum DayOfWeek {
|
|||
|
||||
*PHP code:*
|
||||
```php
|
||||
<?php
|
||||
|
||||
echo DayOfWeek::Monday; // prints 1
|
||||
```
|
||||
|
||||
## Defining `enum` in PHP code
|
||||
*Not supported*
|
||||
|
||||
*Not supported*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# .NET reference overview
|
||||
|
||||
This section provides information on cross-language calls and declarations between `PHP` and `C#` (.NET); an **interoperability** in general. In principal the PeachPie project turns the PHP language into a compiled .NET language with all their features, advantages and disadvantages. Since PHP is a dynamic language which differs from statically compiled languages, it uses a different way of typing variables, function invocation, introduces a global code scope and the need of script inclusion, it is necessary to takes this into account when bridging between C# and PHP.
|
||||
This section provides information on cross-language calls and declarations between `PHP` and `C#` (.NET); an **interoperability** in general. In principal the PeachPie project turns the PHP language into a compiled .NET language with all their features, advantages and disadvantages. Since PHP is a dynamic language which differs from statically compiled languages, it uses a different way of typing variables, function invocation, introduces a global code scope and the need of script inclusion. It is necessary to takes these into account when bridging between C# and PHP.
|
||||
|
||||
!!! tip "Classes"
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче