A port of Matlab's Why function

1.0.1 2020-08-22 12:01 UTC

This package is auto-updated.

Last update: 2024-05-22 20:27:55 UTC


Matlab has an easter egg where you type why and you get a fun answer. This project is highly inspired by that Matlab function.

The matlab definition


composer require nyholm/why


$why = new \Nyholm\Why\ReasonGenerator();
echo $why->generate(); // Stupid question!
echo $why->generate(); // To please the good programmer.
echo $why->generate(); // For the love to some product manager.
echo $why->generate(); // The young terrified engineer helped some rich and good terrified and very smart and rich kid.
echo $why->generate(); // The devil made me do it.
echo $why->generate(); // The tall tall programmer insisted on it.