diff --git a/content/documentation/php-interop.md b/content/documentation/php-interop.md index 39f4e864..2de1032e 100644 --- a/content/documentation/php-interop.md +++ b/content/documentation/php-interop.md @@ -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.