File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -367,11 +367,13 @@ of the ``anonymize()`` method to specify the number of bytes that should be
367367anonymized depending on the IP address format::
368368
369369 $ipv4 = '123.234.235.236';
370- $anonymousIpv4 = IpUtils::anonymize($ipv4, v4Bytes: 3);
370+ $anonymousIpv4 = IpUtils::anonymize($ipv4, 3);
371371 // $anonymousIpv4 = '123.0.0.0'
372372
373373 $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);
375377 // $anonymousIpv6 = '2a01:198:603::'
376378
377379.. versionadded :: 7.2
You can’t perform that action at this time.
0 commit comments