<?php
$checker = new Spoofchecker();
$checker->setAllowedLocales('en_US');
var_dump($checker->isSuspicious('google.com')); // FALSE: only ASCII characters
var_dump($checker->isSuspicious('Рaypal.com')); // TRUE
// The first letter is from Cyrylic, not a regular latin "P"
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
bool(false)
bool(true)
Output for 8.0.13
Fatal error: Uncaught Error: Class "Spoofchecker" not found in /in/33qXs:2
Stack trace:
#0 {main}
thrown in /in/33qXs on line 2
Process exited with code 255.
Output for 7.3.32 - 7.3.33, 7.4.33
Fatal error: Uncaught Error: Class 'Spoofchecker' not found in /in/33qXs:2
Stack trace:
#0 {main}
thrown in /in/33qXs on line 2
Process exited with code 255.