PHP Classes

PHP Vending Machine: Simulate a vending machine business operations

Recommend this page to a friend!
  Info   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 210 All time: 8,342 This week: 123Up
Version License PHP version Categories
vendingmachine 1.0.0GNU General Publi...5PHP 5, Finances


This package can simulate a vending machine business operations.

The main class can process several operations like:

- Add products to the stock
- Get the price of the products
- Add coins inserted by the customer
- Process payments using bills, coins or a card
- Compute the change to be returned to the customer using the available coins

Innovation Award
PHP Programming Innovation award nominee
May 2019
Number 9
Vending machines are very common and appear in many places to sell food, drinks and other types of products.

This package provides a complete simulation of a vending machine written in PHP, so it can be used to test vending machine designs that can be implemented in the real world.

Manuel Lemos
Picture of Charles
  Performance   Level  
Name: Charles <contact>
Classes: 4 packages by
Country: China China
Age: 51
All time rank: 171419 in China China
Week rank: 129 Up1 in China China Up
Innovation award
Innovation award
Nominee: 4x

Winner: 1x

  Files folder image Files  
File Role Description
Plain text file BankCard.php Class Class source
Plain text file Factory.php Class Class source
Accessible without login Image file machine.jpeg Data Auxiliary data
Plain text file VendingMachine.php Class Class source
Accessible without login Plain text file VendingMachineTest.php Test PHPUnit test class

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:8,342
This week:123Up