Skip to content

Commit bdf563b

Browse files
committed
docs: #139 fluent and nested method calls again
1 parent 37ff05d commit bdf563b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

content/documentation/php-interop.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,13 @@ You can chain multiple method calls or property accesses in one `php/->` express
7373
7474
# Mix methods and properties: $user->profile->getDisplayName()
7575
(php/-> user profile (getDisplayName))
76+
77+
# Other example using nested properties:
78+
(def address (php/new \stdClass))
79+
(def user (php/new \stdClass))
80+
(php/oset (php/-> address city) "Berlin")
81+
(php/oset (php/-> user address) address)
82+
(php/-> user address city) # Evaluates to "Berlin"
7683
```
7784

7885
## PHP static method and property call

0 commit comments

Comments
 (0)