ephp icon indicating copy to clipboard operation
ephp copied to clipboard

`print` and `echo` functions with `or` and `and`

Open manuel-rubio opened this issue 8 years ago • 0 comments

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.

manuel-rubio avatar May 01 '17 18:05 manuel-rubio