Skip to content

Remove return from script() example#319

Merged
nunomaduro merged 1 commit intopestphp:4.xfrom
Frnk1996:patch-1
Aug 22, 2025
Merged

Remove return from script() example#319
nunomaduro merged 1 commit intopestphp:4.xfrom
Frnk1996:patch-1

Conversation

@Frnk1996
Copy link
Copy Markdown
Contributor

Running "$result = $page->script('return document.title');" throws an error: "SyntaxError: Illegal return statement"

After removing the return, everything works as intended and $result is filled with the correct value.

Running "$result = $page->script('return document.title');" throws an error: "SyntaxError: Illegal return statement"

After removing the return, everything works as intended and $result is filled with the correct value.
@nunomaduro nunomaduro merged commit 1444d52 into pestphp:4.x Aug 22, 2025
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

Successfully merging this pull request may close these issues.

2 participants