Skip to content
This repository was archived by the owner on Sep 12, 2018. It is now read-only.

Commit 8608811

Browse files
committed
Added more control structure examples.
1 parent 3a8e8d8 commit 8608811

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,12 +201,16 @@ special semantics that need to be taken into account.
201201

202202
Ruby input | PHP output
203203
-------------------------------------|--------------------------------------
204-
return | return
205-
return $x | return $x
206204
if true then ... else ... end | if (TRUE) { ... } else { ... }
205+
... if true | if (TRUE) { ... }
207206
unless true then ... else ... end | if (!TRUE) { ... } else { ... }
207+
... unless true | if (!TRUE) { ... }
208208
while $x; ...; end | while ($x) { ... }
209+
until $x; ...; end | while (!$x) { ... }
209210
for $x in $y; ...; end | foreach ($y as $x) { ... }
211+
for $k, $v in $z; ...; end | foreach ($z as $k => $v) { ... }
212+
return | return
213+
return $x | return $x
210214

211215
Limitations
212216
-----------

0 commit comments

Comments
 (0)