ephp
ephp copied to clipboard
`print` and `echo` functions with `or` and `and`
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.