class Product { private $isAvailableWhenOutOfStock = false; //initial value public function __construct($isAvailableWhenOutOfStock) { $this->isAvailableWhenOutOfStock = $isAvailableWhenOutOfStock; } public function getIsAvailableWhenOutOfStock() { return $this->isAvailableWhenOutOfStock; } } $prod1 = new Product(false); $prod2 = new Product(true); echo $prod1->getIsAvailableWhenOutOfStock() ? "Available" : "Not Available"; // "Not Available" echo $prod2->getIsAvailableWhenOutOfStock() ? "Available" : "Not Available"; // "Available"Package Library: This function is not part of any specific package library but can be implemented in any PHP project as per requirements.