Kevin Kevin - 5 months ago 44
PHP Question

Multiple function tasks php

I have a question about a function using php.

Can i for example have a function with the same name do multiple things.


function name () {
echo "this";

function name () {
echo "that";


so the same function doing multiple tasks.


No, this is not possible, and will yield

Fatal error: Cannot redeclare name() (previously declared in ...) in php shell code on line ...