3v4l.org

run code in 300+ PHP versions simultaneously
<?php //unset($_COOKIE['aiepsso']); $userid="aaron.aguirre"; $rut="17317380"; $timestamp=time(); $courseid="null"; $ruta="null"; $sharedSecret="AIEP"; $macParamsString=$courseid.$rut.$ruta.$timestamp.$userid.$sharedSecret; $md5String=md5($macParamsString); $auth=base64_encode($macParamsString);//$md5String); $host="location:https://aieptest.blackboard.com"; $hostV="https://aiepclone.blackboard.com"; $hostVL="location:https://aiepclone.blackboard.com"; $hostT="location:http://localhost:9876"; $autoSignOnURL="/webapps/oslt-auth-provider-autosignon-BBLEARN/service/login/_142_1"; $params="timestamp=".$timestamp."&userId=".$userid."&courseid=".$courseid."&ruta=".$ruta."&rut=".$rut."&auth=".$md5String;//.$auth; $bbURL=$hostV.$autoSignOnURL;//.$params; // header("location:".$bbURL."?".$params); /////////////////////////CURL//////////////////////// /*$curl=curl_init(); $postParameters=array(); $postParameters['timestamp']=$timestamp; $postParameters['userId']=$userid; $postParameters['courseid']=$courseid; $postParameters['ruta']=$ruta; $postParameters['rut']=$rut; $postParameters['auth']=$md5String; curl_setopt($curl,CURLOPT_URL,$bbURL); curl_setopt($curl,CURLOPT_POST,sizeof($postParameters)); curl_setopt($curl,CURLOPT_POSTFIELDS,http_build_query($postParameters)); curl_setopt($curl, CURLOPT_HEADER, true); curl_setopt($curl, CURLOPT_RETURNTRANSFER,true); curl_setopt($curl,CURLOPT_COOKIE, $cookiesIn); curl_setopt($curl,CURLOPT_COOKIEFILE, ""); curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); //curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "POST"); $result = curl_exec($curl); $header = curl_getinfo( $curl ); $err = curl_errno( $curl ); $errmsg = curl_error( $curl ); curl_close($curl); $header_content = substr($result, 0, $header['header_size']); $postValue=file_get_contents($bbURL); $body_content = trim(str_replace($header_content, '', $result)); $pattern = "#Set-Cookie:\\s+(?<cookie>[^=]+=[^;]+)#m"; preg_match_all($pattern, $header_content, $matches); $cookiesOut = implode("; ", $matches['cookie']); $header['errno'] = $err; $header['errmsg'] = $errmsg; $header['headers'] = $header_content; $header['content'] = $body_content; $header['cookies'] = $cookiesOut; $cookiesValue1=explode("=",$matches[cookie][0]); $cookiesValue2=explode("=",$matches[cookie][1]); $cookiesValue3=explode("=",$matches[cookie][2]); $cookiesValue4=explode("=",$matches[cookie][3]); $cookiename1=$cookiesValue1[0]; $cookiename2=$cookiesValue2[0]; $cookiename3=$cookiesValue3[0]; $cookiename4=$cookiesValue4[0]; $cookieValue1=$cookiesValue1[1]; $cookieValue2=$cookiesValue2[1]; $cookieValue3=$cookiesValue3[1]; $cookieValue4=$cookiesValue4[1];*/ /* setcookie($cookiename1,$cookieValue1,0,"/"); setcookie($cookiename2,$cookieValue2,0,"/"); setcookie($cookiename3,$cookieValue3,0,"/"); setcookie($cookiename4,$cookieValue4,0,"/"); */ /* preg_match_all('|Location: (.*)\n|U', $result, $results); $location = implode(';', $results[1]); $realLocationA=$results[1];//implode(";",$location); $realLocation=$realLocationA[2]; setcookie("",$cookiesOut,0,"/",$realLocation);*/ /*setcookie($cookiename1,$cookieValue1,0,"/",$realLocation); setcookie($cookiename2,$cookieValue2,0,"/",$realLocation); setcookie($cookiename3,$cookieValue3,0,"/",$realLocation); setcookie($cookiename4,$cookieValue4,0,"/",$realLocation);*/ //header("Location: $realLocation"); //header("location:".$header['redirect_url']); ////////////////////////////////////////////////////////////////// ///////////////////////////////////////File Get Contents /////////////////////////// /*$curl=curl_init(); $postParameters=array(); $postParameters['timestamp']=$timestamp; $postParameters['userId']=$userid; $postParameters['courseid']=$courseid; $postParameters['ruta']=$ruta; $postParameters['rut']=$rut; $postParameters['auth']=$md5String; curl_setopt($curl,CURLOPT_URL,$bbURL); curl_setopt($curl,CURLOPT_POST,sizeof($postParameters)); curl_setopt($curl,CURLOPT_POSTFIELDS,http_build_query($postParameters)); curl_setopt($curl, CURLOPT_HEADER, true); curl_setopt($curl, CURLOPT_RETURNTRANSFER,true); curl_setopt($curl,CURLOPT_COOKIE, $cookiesIn); curl_setopt($curl,CURLOPT_COOKIEFILE, ""); curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); //curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "POST"); $result = curl_exec($curl); $header = curl_getinfo( $curl ); $err = curl_errno( $curl ); $errmsg = curl_error( $curl ); curl_close($curl); $authLocation="location:".$header['url']; //print $result; header($authLocation);*/ /* $postdata=http_build_query(array( 'timestamp' => $timestamp, 'userId' => $userid, 'courseid' => $courseid, 'ruta' => $ruta, 'rut' => $rut, 'auth' => $md5String)); $opts=array('https'=>array('method'=>'POST','header'=>"Connection: close\r\n"."Content-Length: ".strlen($postdata)."\r\n",'content'=>$postdata));//$postdata)); $context=stream_context_create($opts); $resultHtml=file_get_contents($bbURL,false,$context); echo $resultHtml;*/ //var_dump($result); //header("location:".$bbURL); //////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////HTTPRequest////////////////////// /* $http = new HttpRequest($bbURL, HttpRequest::METH_POST); $http->addPostFields(array( 'timestamp' => $timestamp, 'userId' => $userid, 'courseid' => $courseid, 'ruta' => $ruta, 'rut' => $rut, 'auth' => $md5String )); $response = $http->send();*/ //////////////////////////////////////////////////////////////// /////////////////////////CURL Less///////////////////////////// /*$data = array('timestamp' => $timestamp, 'userId' => $userid,'courseid' => $courseid,'ruta' => $ruta,'rut' => $rut, 'auth' => $md5String); $options = array( 'http' => array( 'header' => "Content-type: application/x-www-form-urlencoded\r\n", 'method' => 'POST', 'content' => http_build_query($data), ), ); $context = stream_context_create($options); //$result = file_get_contents($bbURL, false, $context); $fp = fopen($bbURL, 'r', false, $context); */ //////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////http_post_fields()/////////////////////////// /* $postdata=array( 'timestamp' => $timestamp, 'userId' => $userid, 'courseid' => $courseid, 'ruta' => $ruta, 'rut' => $rut, 'auth' => $md5String); $response=http_post_fields($bbURL,$postdata); */ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////HTTP Request//////////////////////////////////////// $r=new http_request($bbURL); $r->setMethod(HTTP_REQUEST_METHOD_POST); $r->addPostData('timestamp',$timestamp); $r->addPostData('userId',$userid); $r->addPostData('courseid',$courseid); $r->addPostData('ruta',$ruta); $r->addPostData('rut',$rut); $r->addPostData('auth',$md5String); $r->sendRequest(); $page=$r->getResponseBody(); echo $page; ///////////////////////////////////////////////////////////////////////////////////// ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
7.2.110.0290.00316.42
7.2.60.0060.00616.88
7.2.00.0030.01319.36
7.1.200.0000.01215.92
7.1.100.0040.00918.28
7.1.70.0080.00017.31
7.1.60.0120.00919.40
7.1.50.0040.01816.84
7.1.00.0070.07322.40
7.0.200.0030.00716.80
7.0.90.0200.05719.95
7.0.80.0030.08720.04
7.0.70.0030.09019.95
7.0.60.0100.08320.03
7.0.50.0100.07720.34
7.0.40.0100.04720.18
7.0.30.0130.07720.12
7.0.20.0100.09020.15
7.0.10.0030.09020.14
7.0.00.0100.08020.06
5.6.240.0170.07020.64
5.6.230.0100.08020.60
5.6.220.0230.06720.59
5.6.210.0030.07020.66
5.6.200.0000.07721.06
5.6.190.0030.08721.04
5.6.180.0130.08320.96
5.6.170.0000.06721.09
5.6.160.0170.07321.01
5.6.150.0130.05321.18
5.6.140.0070.08021.02
5.6.130.0070.05020.94
5.6.120.0130.08721.02
5.6.110.0100.07721.07
5.6.100.0130.07721.10
5.6.90.0030.09021.00
5.6.80.0070.04720.47
5.6.70.0100.07020.47
5.6.60.0100.04720.44
5.6.50.0000.08020.43
5.6.40.0030.08320.39
5.6.30.0100.07320.30
5.6.20.0100.08020.35
5.6.10.0100.06320.38
5.6.00.0070.05320.38
5.5.380.0170.07320.55
5.5.370.0000.07020.36
5.5.360.0130.07720.41
5.5.350.0170.07020.43
5.5.340.0070.04720.91
5.5.330.0030.09020.93
5.5.320.0030.08320.92
5.5.310.0100.08320.93
5.5.300.0100.08020.92
5.5.290.0100.05720.83
5.5.280.0030.06720.87
5.5.270.0170.07020.88
5.5.260.0100.08320.88
5.5.250.0070.08020.68
5.5.240.0170.07020.27
5.5.230.0030.08020.27
5.5.220.0170.06720.27
5.5.210.0200.06320.16
5.5.200.0100.06320.23
5.5.190.0170.07320.26
5.5.180.0030.07720.19
5.5.160.0130.07020.08
5.5.150.0030.08720.24
5.5.140.0030.05320.27
5.5.130.0000.04320.15
5.5.120.0130.06320.13
5.5.110.0070.04320.18
5.5.100.0130.06720.18
5.5.90.0170.08320.05
5.5.80.0070.06720.17
5.5.70.0130.04320.06
5.5.60.0030.08320.10
5.5.50.0100.05720.11
5.5.40.0030.07720.16
5.5.30.0030.04720.06
5.5.20.0100.08020.15
5.5.10.0230.04020.04
5.5.00.0030.07320.04

preferences:
36.39 ms | 400 KiB | 5 Q