Home >Backend Development >PHP Tutorial >PHP compares the difference between two URLs

PHP compares the difference between two URLs

WBOY
WBOYOriginal
2016-07-25 08:49:341070browse
This class can compare two URLs, the class ignores the order of query parameters, so it is able to determine the URL
  1. $obj = new UrlDiffer("http://www.codepearl.com/?foo=bar&cake=lie&you=monster&beer=good&speech=free&breaking=bad&task=edit","http://www.codepearl.com/ ?&speech=free&beer=good&aperture=science&task=add&foo=bar&you=here&breaking=over",true);
  2. $obj->getDifference();
Copy code
PHP compares the difference between two URLs


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:Multi-threaded cURLNext article:Multi-threaded cURL