Hi! Could we please enable some services and cookies to improve your experience and our website?

PHPize Online / SQLize Online  /  SQLtest Online

A A A
Login    Share code      Blog   FAQ

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

Copy Format Clear
CREATE TABLE user_value (`user_name` varchar(4), `user_pass` varchar(3)) ;

Stuck with a problem? Got Error? Ask AI support!

Copy Clear
Copy Format Clear
<?php // Enable error reporting for debugging error_reporting(E_ALL); ini_set('display_errors', 1); // Function to find the greater number function findGreater($num1, $num2) { if ($num1 > $num2) { return "The greater number is: $num1"; } elseif ($num2 > $num1) { return "The greater number is: $num2"; } else { return "Both numbers are equal."; } } // Running the function with example inputs for online compilers $num1 = intval(readline("Enter first number: ")); $num2 = intval(readline("Enter second number: ")); // Output the result echo findGreater($num1, $num2) . "\n";
Copy Clear