3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php //$homepage = FILE_GET_CONTENTS('WWW.ROGERS.COM'); $homepage = true; if(!$homepage){ die("FILE_GET_CONTENTS_ERROR"); } $rogers = "tttttttt<a href=\"/business/BSS.portal?_nfpb=true&_st=&_windowLabel=header_portlet&_urlType=action&wlpheader_portlet_action=changeLanguage&lang=fr\">francais</a>tttttttttt"; echo($rogers); echo("\n"); $pos = strpos($rogers, "francais"); if($pos === FALSE){ die("STRPOS_ERROR"); } $rogers = substr($rogers, 0, $pos); if(!$rogers){ die("SUBSTR_ERROR"); } $rogers = strrev($rogers); $pos = strpos($rogers, "a<"); if($pos === FALSE){ die("STRPOS_ERROR"); } $rogers = substr($rogers, 0, $pos); if(!$rogers){ die("SUBSTR_ERROR"); } $rogers = strrev($rogers); echo($rogers); echo("\n"); $len = strlen($rogers); $rogers = substr($rogers, 6, $len - 2); if(!$rogers){ die("SUBSTR_ERROR"); } echo($rogers); echo("\n");
based on ZvP4T
Output for 4.3.0 - 7.2.0
tttttttt<a href="/business/BSS.portal?_nfpb=true&_st=&_windowLabel=header_portlet&_urlType=action&wlpheader_portlet_action=changeLanguage&lang=fr">francais</a>tttttttttt href="/business/BSS.portal?_nfpb=true&_st=&_windowLabel=header_portlet&_urlType=action&wlpheader_portlet_action=changeLanguage&lang=fr"> "/business/BSS.portal?_nfpb=true&_st=&_windowLabel=header_portlet&_urlType=action&wlpheader_portlet_action=changeLanguage&lang=fr">