PHP Code Runner PHP Code Editor .php <?php // Simple PHP code example echo "<h1 style='text-align: center; color: #4CAF50;'>Hello PHP World!</h1>"; echo "<p style='text-align: center;'>Today is " . date('Y-m-d') . "</p>"; // Sample form echo '<form style="max-width: 300px; margin: 20px auto; padding: 20px; border: 1px solid #ddd; border-radius: 5px;"> <h3>Sample Form</h3> <input type="text" placeholder="Username" style="width: 100%; padding: 8px; margin: 5px 0;"> <input type="password" placeholder="Password" style="width: 100%; padding: 8px; margin: 5px 0;"> <button type="submit" style="background: #4CAF50; color: white; border: none; padding: 10px; width: 100%; margin-top: 10px;">Login</button> </form>'; // Simple calculation $num1 = 10; $num2 = 5; echo "<div style='text-align: center;'>$num1 + $num2 = " . ($num1 + $num2) . "</div>"; ?> Run PHP Code View Output PHP Output Preview Close