nyholm/why

A port of Matlab's Why function

Maintainers

👁 Nyholm

Package info

github.com/Nyholm/matlab-why

pkg:composer/nyholm/why

Statistics

Installs: 71

Dependents: 0

Suggesters: 0

Stars: 2

Open Issues: 0

1.0.1 2020-08-22 12:01 UTC

Requires

  • php: ^7.3 || ^8.0

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 7e5848378867d9fc9125e63e353ea9268fbdc6d9

  • Nyholm <tobias.nyholm.woop@gmail.com>

This package is auto-updated.

Last update: 2026-06-23 01:11:34 UTC


README

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

Install

composer require nyholm/why

Use

$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.