What is the difference between using instanceof and new when working with class names in PHP?

When working with class names in PHP, using `instanceof` is used to check if an object is an instance of a certain class, while `new` is used to create a new instance of a class. `instanceof` is typically used for checking the type of an object, while `new` is used for creating new instances of a class.

// Using instanceof to check if an object is an instance of a certain class
if ($object instanceof ClassName) {
    // Object is an instance of ClassName
}

// Using new to create a new instance of a class
$newObject = new ClassName();