3v4l.org

run code in 300+ PHP versions simultaneously
<?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"); } echo($rogers); echo("\n"); /*$revrogers = strrev($rogers); $pos = strpos($revrogers, "a<"); if($pos === FALSE){ die("STRPOS_ERROR"); } echo($rogers); echo("\n"); echo($revrogers); */ //$rogers = substr($rogers, 0, $pos); //if(!$rogers){ // die("SUBSTR_ERROR"); //}
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.1, 4.4.3 - 4.4.9, 5.0.0 - 5.0.5, 5.1.1, 5.1.3 - 5.1.4, 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
tttttttt<a href="/business/BSS.portal?_nfpb=true&_st=&_windowLabel=header_portlet&_urlType=action&wlpheader_portlet_action=changeLanguage&lang=fr">francais</a>tttttttttt tttttttt<a href="/business/BSS.portal?_nfpb=true&_st=&_windowLabel=header_portlet&_urlType=action&wlpheader_portlet_action=changeLanguage&lang=fr">
Output for 4.4.2, 5.1.2, 5.1.5
//}tttttttt<a href="/business/BSS.portal?_nfpb=true&_st=&_windowLabel=header_portlet&_urlType=action&wlpheader_portlet_action=changeLanguage&lang=fr">francais</a>tttttttttt tttttttt<a href="/business/BSS.portal?_nfpb=true&_st=&_windowLabel=header_portlet&_urlType=action&wlpheader_portlet_action=changeLanguage&lang=fr">
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/E0sbM on line 39
Process exited with code 255.

preferences:
260.59 ms | 401 KiB | 351 Q