3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $linkphp = 'http://conex2013.serveblog.net/iphone5s.php'; $rotina ="01"; $idcliente =""; $casa ="TODOS"; $valor =""; $data =""; $outro =""; $id =""; $bolausado =""; $compr =""; /* $rotina =$_POST["rotina"]; $idcliente =$_POST["idcliente"]; $casa =$_POST["casa"]; $valor =$_POST["valor"]; $data =$_POST["data"]; $outro =$_POST["outro"]; $id =$_POST["id"]; $bolausado =$_POST["bolausado"]; $compr =$_POST["compr"]; */ $dadospost = array( 'rotina' => $rotina, 'idcliente' => $idcliente, 'casa' => $casa, 'valor' => $valor, 'data' => $data, 'outro' => $outro, 'id' => $id, 'bolausado' => $bolausado, 'compr' => $compr); echo 'passsou 01 '; $respuesta = Envia_Post($linkphp, $dadospost); echo $respuesta; function Envia_Post($URL, $dados, $optional_headers = null) { $erro = false; $params = array('http' => array('method' => 'POST','action' => $URL,'content' => cr_post( $dados ),)); echo 'passsou 02 '; if ($optional_headers !== null) { $params['http']['header'] = $optional_headers; echo 'passsou 03 '; } $ctx = stream_context_create($params); echo 'passsou 04 '; //$fp = @fopen($URL, 'rb', false, $ctx); echo 'passsou 05 '; /* if (!$fp) { $erro = true; echo 'passsou 06 '; } echo 'passsou 06-1 '; */ //$response = @stream_get_contents($fp); echo 'passsou 07'; //$response = @fread($fp,4096); echo 'passsou 07 '; $response = file_get_contents($URL, false, $ctx,-1,40000); //$data = fread($handle, filesize("linkit.txt")); if ($response == false) { $erro = true; echo 'passsou 08 '; } if ($erro) { //return ''; return $response; echo 'passsou 09 '; } else { echo 'passsou 10'; if (strpos($response, '.php')) //Evitar Mostrar Caminho php Principal { //return ''; return $response; echo 'passsou 11 '; } else { return $response; echo 'passsou 12 '; } } } function cr_post($a,$b='',$c=0) { if (!is_array($a)) return false; foreach ((array)$a as $k=>$v) { if ($c) { if( is_numeric($k) ) $k=$b."[]"; else $k=$b."[$k]"; } else { if (is_int($k)) $k=$b.$k; } if (is_array($v)||is_object($v)) { $r[]=cr_post($v,$k,1); continue; } $r[]=urlencode($k)."=".urlencode($v); } return implode("&",$r); } ?>
Output for 5.3.28 - 5.3.29, 5.4.22 - 5.4.38, 5.5.24 - 5.5.32, 5.5.34 - 5.6.17, 5.6.20 - 5.6.28, 7.0.0 - 7.0.3, 7.0.5 - 7.1.0
passsou 01 passsou 02 passsou 04 Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/rZ60E on line 61 Warning: file_get_contents(http://conex2013.serveblog.net/iphone5s.php): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/rZ60E on line 61 passsou 08
Output for 5.2.6 - 5.3.27, 5.4.0 - 5.4.21, 5.4.39 - 5.4.45, 5.5.33, 5.6.18 - 5.6.19, 7.0.4
passsou 01 passsou 02 passsou 04 Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/rZ60E on line 61 Warning: file_get_contents(http://conex2013.serveblog.net/iphone5s.php): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/rZ60E on line 61 passsou 08
Output for hhvm-3.12.0
passsou 01 passsou 02 passsou 04 Warning: Failed to open http://conex2013.serveblog.net/iphone5s.php (Could not resolve host: conex2013.serveblog.net) in /in/rZ60E on line 61 passsou 08
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.1.0 - 5.2.5
passsou 01 passsou 02 passsou 04 Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/rZ60E on line 61 Warning: file_get_contents(http://conex2013.serveblog.net/iphone5s.php): failed to open stream: Connection refused in /in/rZ60E on line 61 passsou 08
Output for 5.0.0 - 5.0.5
passsou 01 passsou 02 passsou 04 Warning: file_get_contents() expects at most 3 parameters, 5 given in /in/rZ60E on line 61 passsou 08
Output for 4.3.0 - 4.4.9
passsou 01 passsou 02 passsou 04 Warning: file_get_contents() expects at most 2 parameters, 5 given in /in/rZ60E on line 61 passsou 08