Skip to content

Commit 0627507

Browse files
cs278isfedorov
authored andcommitted
"classish"_exists() functions are not pure
These functions all trigger autoloading which may have the effect of definining one or more new symbols. Note this does not apply to `function_exists()` as there is no function autoloading.
1 parent 3c9b3f8 commit 0627507

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

Core/Core.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,6 @@ function property_exists($object_or_class, string $property): bool {}
444444
* @link https://secure.php.net/manual/en/function.trait-exists.php
445445
* @since 5.4
446446
*/
447-
#[Pure(true)]
448447
function trait_exists(string $trait, bool $autoload = true): bool {}
449448

450449
/**
@@ -459,7 +458,6 @@ function trait_exists(string $trait, bool $autoload = true): bool {}
459458
* @return bool true if <i>class_name</i> is a defined class,
460459
* false otherwise.
461460
*/
462-
#[Pure(true)]
463461
function class_exists(string $class, bool $autoload = true): bool {}
464462

465463
/**
@@ -475,7 +473,6 @@ function class_exists(string $class, bool $autoload = true): bool {}
475473
* <i>interface_name</i> has been defined, false otherwise.
476474
* @since 5.0.2
477475
*/
478-
#[Pure(true)]
479476
function interface_exists(string $interface, bool $autoload = true): bool {}
480477

481478
/**
@@ -507,7 +504,6 @@ function function_exists(string $function): bool {}
507504
* false otherwise.
508505
* @since 8.1
509506
*/
510-
#[Pure(true)]
511507
function enum_exists(string $enum, bool $autoload = true): bool {}
512508

513509
/**

0 commit comments

Comments
 (0)