Skip to content
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

print and echo functions with or and and #10

Open
manuel-rubio opened this issue May 1, 2017 · 0 comments
Open

print and echo functions with or and and #10

manuel-rubio opened this issue May 1, 2017 · 0 comments
Labels
enhancement help wanted We need help here!

Comments

@manuel-rubio
Copy link
Member

manuel-rubio commented May 1, 2017

The use of and and or with the echo and print functions is tricky:

print "OK" or die("trying");

It could be understood as (1):

print("OK") or die("trying");

or maybe as (2):

print("OK" or die(trying));

The trade-off of the original line above is the ambiguity. The current implementation for PHP is the (1). And thanks to a work-around in the parser it is working for simple structures, but it should be improved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement help wanted We need help here!
Projects
None yet
Development

No branches or pull requests

1 participant