Welcome to BoxPacker’s documentation!

BoxPacker is 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.

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.

License

BoxPacker is licensed under the MIT license.

Warning

You are reading the documentation for BoxPacker v1 which is no longer maintained except for the bare minimum work to allow it to function on newer PHP versions.

All users are recommended to upgrade to v2/v3 which removes the “always keep flat” limitation on items.