Skip to content

print and echo functions with or and and #10

@manuel-rubio

Description

@manuel-rubio

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions