3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $lngtrainscrid=8; $strurlregister="http://formations.ademe.fr/solutions/register-thankyou.php?folid=26&devis=0&creacompte=0"; $strurlpos = strpos($strurlregister,".com/"); $strurlpos2 = strpos($strurlregister,".org/"); if($strurlpos != 0){ $strurlsuppr = substr($strurlregister,$strurlpos+4); $strurl = str_replace($strurlsuppr,"",$strurlregister); }else{ $strurlsuppr = substr($strurlregister,$strurlpos2+4); $strurl = str_replace($strurlsuppr,"",$strurlregister); } $strurl.="/back/trainbordereaupreinscr.php?output=5&trainscrid=".$lngtrainscrid; echo $strurl;
based on BCJ4r
Output for 4.3.0 - 7.2.0
http/back/trainbordereaupreinscr.php?output=5&trainscrid=8