Skip to content

fix changes for (;;) {} to for (;) {} #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bendavies opened this issue Dec 10, 2024 · 1 comment
Closed

fix changes for (;;) {} to for (;) {} #21

bendavies opened this issue Dec 10, 2024 · 1 comment
Assignees

Comments

@bendavies
Copy link
Contributor

hi,

fix changes:

for (;;) {}

to invalid code:

for (;) {}
@azjezz azjezz added the bug label Dec 10, 2024
@azjezz azjezz self-assigned this Dec 10, 2024
@azjezz azjezz closed this as completed in 39aac00 Dec 10, 2024
@azjezz
Copy link
Member

azjezz commented Dec 10, 2024

fixed:

diff of 'src/main.php':
--- original
+++ modified
@@ -1,16 +1,16 @@
 <?php

-for (;;) {}
-for(;;){}
+while (true) {}
+while(true){}

-for (; $i < 10;) {}
+while ( $i < 10) {}

-for (;;):
+while (true):

     echo "Hello, World!";
-endfor;
+endwhile;

-for(
-;
-;
-):endfor;
+while(
+true
+
+):endwhile;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants