I want to know if I can call a function inside a script from the command line, using for example:
$ php script.php minhaFunção() <argumento>
In this case, the function is not inside a class (do I need to be?)
Below my code:
<?php
function dobro($valor) {
$resultado = $valor + $valor;
echo $resultado;
}