PHP code example of josephnc / phpfuncs

1. Go to this page and download the library: Download josephnc/phpfuncs library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

josephnc / phpfuncs example snippets




#use function JosephNC\PHPFuncs\<function_name_here>;

use function JosephNC\PHPFuncs\real_ip;
use function JosephNC\PHPFuncs\is_array_equal;

$array1 = [
    'foo' => 'bar',
    'bar' => 'foo',
];

$array2 = [
    'bar' => 'foo',
    'foo' => 'bar',
];

$ip_address = real_ip();
$equal      = is_array_equal($array1, $array2);

echo 'Here is your IP Address: ' . $ip_address . '<br>';

if ($equal) {
    echo 'Your arrays are equal!';
} else {
    echo 'Your arrays are not equal.';
}