palpaka/main

1.0.0 2020-12-16 08:37 UTC

This package is auto-updated.

Last update: 2024-04-16 16:52:01 UTC


README

Require the package by using composer:

composer require palpaka/main

Use the __main__ function to detect if the script was directly called:

<?php

require __DIR__ . '/vendor/autoload.php';

function main(): int
{
    return 0;
}

if (__main__())
{
    main();
}