2 Variablen/Eingaben vergleichen

Dieses PHP-Script vergleicht zwei Variablen-Inhalte miteinander. Bei Gleichheit wird „true“ zurückgegeben, bei Unterschieden „false“.

<?php
/*
    This Software compares 2 given vars.

    Copyright (C) 2020 Guido Richter / tintenkobold.de

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License [http://www.gnu.org/licenses/] for more details.
*/

function compare($a,$b)
{
	if($a.'x'==$b.'x')	return true;
	else			return false;
}

?>

Schreibe einen Kommentar