Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created February 2, 2021 18:13
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/c6736df89d98c6c73cc43961046fae93 to your computer and use it in GitHub Desktop.
Save parzibyte/c6736df89d98c6c73cc43961046fae93 to your computer and use it in GitHub Desktop.
<?php
$resultado = "";
if ($tamanioFichero1 === $tamanioFichero2 && $contenidoFichero1 === $contenidoFichero2) {
$resultado = "TAMAÑO IGUAL\nTamaño: " . $tamanioFichero1 . " bytes\nCONTENIDO IGUAL\nContenido 1 y 2: " . $contenidoFichero1;
} else if ($tamanioFichero1 === $tamanioFichero2 && $contenidoFichero1 !== $contenidoFichero2) {
$resultado = "TAMAÑO IGUAL\nTamaño: " . $tamanioFichero1 . " bytes\nCONTENIDO DIFERENTE\nContenido 1: " . $contenidoFichero1 . "\nContenido 2: " . $contenidoFichero2;
} else {
$resultado = "TAMAÑO DIFERENTE\nTamaño: " . $tamanioFichero1 . "bytes - " . $tamanioFichero2 . "bytes\nCONTENIDO DIFERENTE\nContenido 1: " . $contenidoFichero1 . "\nContenido 2: " . $contenidoFichero2;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment