Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created August 1, 2019 15:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/a69242ff2e20b631a76d6a79ac630bb4 to your computer and use it in GitHub Desktop.
Save parzibyte/a69242ff2e20b631a76d6a79ac630bb4 to your computer and use it in GitHub Desktop.
<?php
/*
Mayor y menor de edad en PHP
@author parzibyte.me
*/
# No hay forma de escanear variables, pero podemos recibirlas por $_POST o $_GET
$edad = 50;
if ($edad >= 18) {
echo "Mayor de edad";
} else {
echo "Menor de edad";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment