nokitakaze / orthogonal_arrays
This package is abandoned and no longer maintained.
No replacement package was suggested.
Orthogonal array
v0.1.1
2018-02-12 17:58 UTC
Requires
- php: ^5.5 | ^7.0.9
Requires (Dev)
- phpunit/phpunit: ^6.0 | ^5.7 | ^4.8.35
This package is auto-updated.
Last update: 2023-05-22 20:34:19 UTC
README
Current status
General
Usage
At first
composer require nokitakaze/orthogonal_arrays
And then
$output = \NokitaKaze\OrthogonalArrays\Arrays::generateN2_values([ ['human', 'cat'], ['boy', 'girl'], [true, false], ]); foreach ($output as $line) { echo implode(', ', $line).";\n"; } /* Output: human, boy, 1; human, girl, 1; human, girl, ; cat, boy, ; cat, girl, 1; */ $output = \NokitaKaze\OrthogonalArrays\Arrays::generateN2_values([ ['female', 'male'], ['catgirl'], [null, 10, 100500], ]); foreach ($output as $line) { echo implode(', ', $line).";\n"; } /* Output: female, catgirl, ; male, catgirl, ; female, catgirl, 10; male, catgirl, 10; female, catgirl, 100500; male, catgirl, 100500; */ $output = \NokitaKaze\OrthogonalArrays\Arrays::squeeze([ ['USA', 'SpaceX'], ['USA', 'NASA'], ['Russia', 'Roscosmos'], ['Poland', null], ]); foreach ($output as $line) { echo implode(', ', $line).";\n"; } /* Output: USA, SpaceX; Russia, SpaceX; Poland, SpaceX; USA, NASA; Russia, NASA; Poland, NASA; USA, Roscosmos; Russia, Roscosmos; Poland, Roscosmos; USA, ; Russia, ; Poland, ; */