(new sessionCart())->Clear(); => $cart = new sessionCart(); $cart->Clear();