PHP Try it yourself interpreter

I want to design a php try it yourself interpreter like we have in for CSS and JS. I googled plenty of stuff i could not find something helpful. What i have tried so far is:

    <!doctype html>
    <meta charset="utf-8">
    <title>Untitled Document</title>


    <form action="<?= $_SERVER["PHP_SELF"] ?>" method="POST">
    <input type="submit">

    <textarea name="code"><?= htmlentities($_POST["code"]) ?></textarea>

    <div id="output">
      <?= $_POST["code"] ?>

I have taken this code from on of the websites on web and honestly speaking its a part of my assignment, i just need some guidance.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.