I want to be able to call php functions from Javascript.I thought of doing something like this, for any function I want to call :jQueryfunction callPhp(func, callback){    $.ajax({    type: 'GET',    url: 'callPhp.php',    data: {func:func},    success: function (data) {        data = JSON.parse(data);        callback(data);    }});}Php (callPhp.php)<?php    require(functions.php);    session_start();    echo JSON.encode(data => eval($_GET['func']));?>I just wrote this code, it is untested. Using this, I can call functions from jQuery using callPhp().Does this have security risks?
Securely calling PHP code from JavaScript
php;jquery;ajax