How can PHP's predefined classes play by different rules and affect implementation cleanliness?

When using PHP's predefined classes, they may have their own set of rules and behaviors that differ from standard PHP functions. This can affect the cleanliness of your implementation if you are not aware of these differences. To address this, it is important to thoroughly read the documentation for each predefined class you are using and understand how they work to ensure your code is clean and functions correctly.

// Example of using a predefined class (DateTime) with different rules
$date = new DateTime();
echo $date->format('Y-m-d H:i:s');