%PDF- %GIF98; %PNG; .
Cyber Programmer
Logo of a company Server : Apache
System : Linux host.digitalbabaji.in 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64
User : addictionfreeind ( 1003)
PHP Version : 7.2.34
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/addictionfreeind/public_html/vendor/nikic/php-parser/test/code/parser/stmt/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/addictionfreeind/public_html/vendor/nikic/php-parser/test/code/parser/stmt/multiCatch.test
Try/catch with multiple classes
-----
<?php
try {
    $x;
} catch (X|Y $e1) {
    $y;
} catch (\A|B\C $e2) {
    $z;
}
-----
!!php7
array(
    0: Stmt_TryCatch(
        stmts: array(
            0: Expr_Variable(
                name: x
            )
        )
        catches: array(
            0: Stmt_Catch(
                types: array(
                    0: Name(
                        parts: array(
                            0: X
                        )
                    )
                    1: Name(
                        parts: array(
                            0: Y
                        )
                    )
                )
                var: e1
                stmts: array(
                    0: Expr_Variable(
                        name: y
                    )
                )
            )
            1: Stmt_Catch(
                types: array(
                    0: Name_FullyQualified(
                        parts: array(
                            0: A
                        )
                    )
                    1: Name(
                        parts: array(
                            0: B
                            1: C
                        )
                    )
                )
                var: e2
                stmts: array(
                    0: Expr_Variable(
                        name: z
                    )
                )
            )
        )
        finally: null
    )
)

VaKeR 2022