How can I console.log/error_log when coding on the leetcode terminal in PHP such that I can see my messages on the console terminal?
CodePudding user response:
You can use standard PHP functions such as: echo, print_r, var_dump.
Example:
CodePudding user response:
<?php
$txt = "PHP";
echo "I love $txt!";
echo "<script> console.log('".$txt ."')</script>";
// or you can use alert
// echo "<script> alert('".$txt ."')</script>";
?>