Skip to content

Commit

Permalink
Merge pull request #98 from phel-lang/docs/90-accessing-superglobals
Browse files Browse the repository at this point in the history
Add Accessing super-globals to PHP Interop page
  • Loading branch information
Chemaclass authored Nov 30, 2024
2 parents abcb1b7 + 1d4ccd3 commit 4822e05
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions content/documentation/php-interop.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ title = "PHP Interop"
weight = 14
+++

## Accessing super-globals

Use the `php/` prefix to access the global variables in combination with `get`.

```phel
(get php/$_SERVER "key") # Similar to $_SERVER['key']
(get php/$GLOBAL "argv") # Similar to $GLOBAL['argv']
```

## Calling PHP functions

PHP comes with huge set of functions that can be called from Phel by just adding a `php/` prefix to the function name.
Expand Down

0 comments on commit 4822e05

Please sign in to comment.