Как в одной функции вызвать другую php? — Q&A Хекслет
2026-02-26 20:27 Diff

Ответы

Для этого можно использовать функцию call_user_func():

<?php function firstFunction() { echo "This is the first function | "; } function secondFunction() { echo "This is the second function"; } function finalFunction() { call_user_func('firstFunction'); call_user_func('secondFunction'); } echo finalFunction(); // => This is the first function | This is the second function