Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
miyako authored Aug 22, 2024
1 parent 562ff5d commit 9019ec7
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,19 @@
Based on [miyako/4d-class-php](https://github.com/miyako/4d-class-php).

The CGI class has been refactored as a Shared Singleton.

## Usage

```4d
$CGI:=cs.PHP.PHP_CGI.new(cs.PHP._PHP_CGI_Controller; $ini).cgi()
$php:="<?php\n\nfunction sum(int $a, int $b): int {\nreturn $a + $b;\n}\n"
$phpFile:=Folder(fk desktop folder).file("test.php")
$phpFile.setText($php)
var $returnValue : Text
If (PHP Execute($phpFile.platformPath; "sum"; $returnValue; 5; 3))
ALERT($returnValue)
End if
```

0 comments on commit 9019ec7

Please # to comment.