Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Simple PHP Code Executor Using eval()
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php
$code = '<?php echo "Hello, World!"; ?>'; // The PHP code to execute
ob_start(); // Start output buffering
eval('?>' . $code); // Evaluate the PHP code
$output = ob_get_clean(); // Capture the output of the code
echo $output; // Display the output
?>