File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -362,16 +362,18 @@ analysis purposes. Use the ``anonymize()`` method from the
362
362
$anonymousIpv6 = IpUtils::anonymize($ipv6);
363
363
// $anonymousIpv6 = '2a01:198:603:10::'
364
364
365
- If you need even more anonymization, you can use the second and third parameters
366
- of the ``anonymize() `` method to specify the number of bytes that should be
365
+ If you need even more anonymization, you can use a second and third parameters
366
+ to the ``anonymize() `` method to specify the number of bytes that should be
367
367
anonymized depending on the IP address format::
368
368
369
369
$ipv4 = '123.234.235.236';
370
- $anonymousIpv4 = IpUtils::anonymize($ipv4, v4Bytes: 3);
370
+ $anonymousIpv4 = IpUtils::anonymize($ipv4, 3);
371
371
// $anonymousIpv4 = '123.0.0.0'
372
372
373
373
$ipv6 = '2a01:198:603:10:396e:4789:8e99:890f';
374
- $anonymousIpv6 = IpUtils::anonymize($ipv6, v6Bytes: 10);
374
+ // (you must define the second argument (bytes to anonymize in IPv4 addresses)
375
+ // even when you are only anonymizing IPv6 addresses)
376
+ $anonymousIpv6 = IpUtils::anonymize($ipv6, 3, 10);
375
377
// $anonymousIpv6 = '2a01:198:603::'
376
378
377
379
.. versionadded :: 7.2
You can’t perform that action at this time.
0 commit comments