![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/squizlabs/php_codesniffer/tests/Core/Tokenizer/ |
<?php /* testGotoStatement */ goto marker; echo 'Foo'; /* testGotoDeclaration */ marker: echo 'Bar'; /* testGotoStatementInLoop */ for($i=0,$j=50; $i<100; $i++) { while($j--) { if($j==17) GOTO end; } } echo "i = $i"; ?> <div><?php $cond ? TEST_A : TEST_B ?></div> <?php /* testGotoDeclarationOutsideLoop */ end: echo 'j hit 17'; switch ($x) { /* testNotGotoDeclarationGlobalConstant */ case CONSTANT: // Do something. break; /* testNotGotoDeclarationNamespacedConstant */ case MyNS\CONSTANT: // Do something. break; /* testNotGotoDeclarationClassConstant */ case MyClass::CONSTANT: // Do something. break; /* testNotGotoDeclarationClassProperty */ case $obj->property: // Do something. break; } switch (true) { /* testNotGotoDeclarationGlobalConstantInTernary */ case $x === ($cond) ? CONST_A : CONST_B: // Do something. break; } /* testNotGotoDeclarationEnumWithType */ enum Suit: string implements Colorful, CardGame {}