Skip to content
4D bin packing / knapsack problem solver
PHP Gherkin
Branch: master
Clone or download
Latest commit 19f99a3 Sep 15, 2019


An implementation of the "4D" bin packing/knapsack problem i.e. given a list of items, how many boxes do you need to fit them all in taking into account physical dimensions and weights.

Especially useful for e.g. e-commerce contexts when you need to know box size/weight to calculate shipping costs, or even just want to know the right number of labels to print.

See documentation for more details.

Build Status Scrutinizer Code Quality Download count Current version Documentation


  • PHP version 7.1 or higher (from version 3)
  • PHP version 5.4 or higher (versions 1 and 2 - still maintained)


BoxPacker is MIT-licensed.

You can’t perform that action at this time.