@ 2025-09-22T01:23:33Z <?php
/* testNotAcceptedTypeExceptionOutsideAttribute1 */
/**
* Docblock
*/
#[Attribute]
function notAcceptedTokenOutsideAttributeTest() {}
/* testNotAcceptedTypeExceptionOutsideAttribute2 */
echo 'notAcceptedTokenOutsideAttributeTest';
/* testAcceptedTokens */
#[AttributeName(10), \AnotherAttribute, namespace\ThirdAttribute(self::CONSTANT, 'foo')]
function acceptedTokensAttributeTarget() {}
/* testFindUnscopedConst */
#[MyAttribute]
const UNSCOPED = true;
array_map(
/* testFindUnscopedClosure */
#[MyAttribute]
function($a) {
return $a++;
},
$array
);
/* testFindUnscopedClosureStatic */
$closure = #[MyAttribute] static function($a) {};
array_map(
/* testFindUnscopedArrowFunction */
#[MyAttribute]
fn($a) => $a++,
$array
);
/* testFindUnscopedArrowFunctionStatic */
$closure = #[MyAttribute] static fn ($a) => $a * 10;
function hasParamAttributes(
/* testFindFunctionParameter */
#[MyAttribute]
#[AnotherAttribute]
$paramA,
/* testFindFunctionParameterTypedNullable */
#[MyAttribute] ?int $paramB,
/* testFindFunctionParameterTypedUnion */
#[MyAttribute] int|false $paramC,
/* testFindFunctionParameterWithRef */
#[MyAttribute]
// Unrelated comment
&$paramD,
/* testFindFunctionParameterWithSpread */
#[MyAttribute]
/** docblock */
...$paramE,
/* testFindFunctionParameterAllTogetherNow */
#[MyAttribute] (\Foo|Partial\Bar|namespace\Other)|array &...$paramF,
) {}
/* testFindClass */
#[MyAttribute]
class classHasAttribute {}
/* testFindClassFinal */
#[MyAttribute]
/**
* Docblock.
*/
#[AnotherAttribute]
final class finalClass {}
/* testFindClassReadonly */
#[MyAttribute]
readonly class readonlyClass {}
/* testFindClassAbstract */
#[MyAttribute]
abstract class abstractClass {}
/* testFindClassFinalReadonly */
#[MyAttribute]
// Unrelated comment.
// Another unrelated comment.
final readonly class finalReadonlyClass {}
/* testFindAnonClass */
$anon = new #[MyAttribute] #[SecondAttribute] class {};
/* testFindAnonClassReadonly */
$anon = new #[MyAttribute] readonly class {};
/* testFindTrait */
#[MyAttribute(10), \Another]
trait traitHasAttribute {}
/* testFindInterface */
#[MyAttribute]
#[AnotherAttributeWithBlankLinesAroundIt(
name: VALUE,
other_name: VALUE,
)]
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).
Version System time (s) User time (s) Memory (MiB) 8.4.12 0.037 0.009 17.80 8.4.11 0.041 0.009 17.89 8.4.10 0.040 0.010 17.75 8.4.9 0.044 0.006 17.91 8.4.8 0.040 0.011 17.58 8.4.7 0.047 0.008 17.83 8.4.6 0.038 0.009 17.34 8.4.5 0.020 0.005 17.23 8.4.4 0.019 0.005 17.32 8.4.3 0.023 0.004 17.08 8.4.2 0.021 0.007 17.61 8.4.1 0.030 0.007 17.41 8.3.25 0.037 0.005 16.30 8.3.24 0.030 0.008 16.17 8.3.23 0.037 0.008 16.68 8.3.22 0.033 0.010 16.15 8.3.21 0.016 0.006 16.64 8.3.20 0.017 0.004 16.56 8.3.19 0.028 0.007 16.50 8.3.18 0.019 0.005 16.26 8.3.17 0.023 0.005 16.54 8.3.16 0.024 0.010 16.38 8.3.15 0.048 0.007 16.49 8.3.14 0.020 0.003 16.67 8.3.13 0.016 0.004 16.85 8.3.12 0.015 0.005 16.72 8.3.11 0.016 0.004 16.70 8.3.10 0.022 0.004 16.52 8.3.9 0.026 0.006 16.60 8.3.8 0.021 0.004 16.65 8.3.7 0.020 0.004 16.56 8.3.6 0.020 0.004 16.55 8.3.5 0.029 0.005 16.34 8.3.4 0.042 0.009 17.78 8.3.3 0.031 0.010 17.44 8.3.2 0.034 0.008 17.64 8.3.1 0.031 0.005 17.62 8.3.0 0.034 0.011 17.55 8.2.29 0.036 0.008 16.40 8.2.28 0.035 0.005 16.36 8.2.27 0.026 0.004 16.68 8.2.26 0.019 0.010 16.36 8.2.25 0.019 0.008 16.67 8.2.24 0.018 0.003 16.57 8.2.23 0.019 0.002 16.48 8.2.22 0.031 0.010 16.38 8.2.21 0.033 0.008 16.29 8.2.20 0.030 0.008 16.46 8.2.19 0.019 0.005 16.57 8.2.18 0.015 0.005 16.48 8.2.17 0.017 0.004 17.69 8.2.16 0.030 0.006 17.40 8.2.15 0.029 0.008 17.38 8.2.14 0.029 0.008 17.53 8.2.13 0.030 0.010 17.29 8.2.12 0.036 0.006 17.57 8.2.11 0.036 0.009 17.38 8.2.10 0.037 0.009 17.26 8.2.9 0.041 0.007 17.58 8.2.8 0.043 0.005 17.34 8.2.7 0.032 0.009 17.06 8.2.6 0.035 0.011 17.16 8.2.5 0.045 0.009 17.31 8.2.4 0.034 0.007 17.37 8.2.3 0.031 0.009 17.42 8.2.2 0.035 0.005 17.36 8.2.1 0.031 0.008 17.25 8.2.0 0.032 0.009 17.40
preferences:dark mode live preview ace vim emacs key bindings
138.29 ms | 993 KiB | 7 Q