Skip to content

Uncatchable fatal error: Multiple final modifiers are not allowed (emitted by parse_code()) #78

Closed
@TysonAndre

Description

@TysonAndre
php > try { $x = ast\parse_code('<?php class C { final final function foo($fff) {}}', 50); } catch (\Throwable $e) {print("Caught exception\n"); echo $e; }

Fatal error: Multiple final modifiers are not allowed in string code on line 1

This was observed in php 7.1.

Is there any way to make this into a catchable \Error?
The fact that it's uncatchable may affect some applications

(Noticed when running this extension on the test phpt files in php-src)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions