Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion features/remote-files.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if (!$file) {
while (!feof ($file)) {
$line = fgets ($file, 1024);
/* Isso só funciona se o título e suas tags estiverem na mesma linha */
if (eregi ("<title>(.*)</title>", $line, $out)) {
if (preg_match ("@\<title\>(.*)\</title\>@i", $line, $out)) {
$title = $out[1];
break;
}
Expand Down
4 changes: 2 additions & 2 deletions reference/array/functions/array-change-key-case.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<![CDATA[
<?php
$input_array = array("primeiRo" => 1, "segunDo" => 4);
print_r(array_change_key_case($input_array, CASE_UPPER);
print_r(array_change_key_case($input_array, CASE_UPPER));
?>
]]>
</programlisting>
Expand All @@ -73,7 +73,7 @@ print_r(array_change_key_case($input_array, CASE_UPPER);
Array
(
[PRIMEIRO] => 1
[SEGUNDO] => 2
[SEGUNDO] => 4
)
]]>
</screen>
Expand Down
2 changes: 1 addition & 1 deletion reference/array/functions/array-count-values.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<![CDATA[
<?php
$array = array(1, "ola", 1, "mundo", "ola");
array_count_values($array);
print_r(array_count_values($array));
?>
]]>
</programlisting>
Expand Down
2 changes: 1 addition & 1 deletion reference/array/functions/array-diff.xml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ $filtro = [new S('b'), new S('c'), new S('d')];
$resultado = array_diff($fonte, $filtro);

// $resultado agora contém uma instância de S('a');
var_dump($result);
var_dump($resultado);
?>
]]>
</programlisting>
Expand Down
4 changes: 2 additions & 2 deletions reference/array/functions/array-key-exists.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
<programlisting role="php">
<![CDATA[
<?php
$busca_array = ['primeiro' => 1, 'segundo' => 4];
$searchArray = ['primeiro' => 1, 'segundo' => 4];
var_dump(array_key_exists('first', $searchArray));
?>
]]>
Expand All @@ -132,7 +132,7 @@ bool(true)
<programlisting role="php">
<![CDATA[
<?php
$search_array = ['primeiro' => null, 'segundo' => 4];
$searchArray = ['primeiro' => null, 'segundo' => 4];

var_dump(isset($searchArray['first']));
var_dump(array_key_exists('first', $searchArray));
Expand Down
4 changes: 2 additions & 2 deletions reference/array/functions/array-replace.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ array(5) {
<![CDATA[
<?php
$base = [ 'cítricas' => [ 'laranja', 'limão' ], 'pomóideas' => [ 'maçã' ] ];
$replacements = [ 'cítricas' => [ 'toranja' ] ];
$replacements2 = [ 'cítricas' => [ 'kumquat', 'cidra' ], 'pomóideas' => [ 'nêspera' ] ];
$substituicoes = [ 'cítricas' => [ 'toranja' ] ];
$substituicoes2 = [ 'cítricas' => [ 'kumquat', 'cidra' ], 'pomóideas' => [ 'nêspera' ] ];

$cesta = array_replace($base, $substituicoes, $substituicoes2);
var_dump($cesta);
Expand Down
2 changes: 1 addition & 1 deletion reference/array/functions/natsort.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<?php
$array1 = $array2 = array("img12.png", "img10.png", "img2.png", "img1.png");

sort($array1);
asort($array1);
echo "Classificação padrão\n";
print_r($array1);

Expand Down
2 changes: 1 addition & 1 deletion reference/gearman/gearmanclient/do.xml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ do
case GEARMAN_WORK_FAIL:
echo "Falhou\n";
exit;
case GEARMAN_Sucesso:
case GEARMAN_SUCCESS:
break;
default:
echo "RET: " . $gmclient->returnCode() . "\n";
Expand Down
2 changes: 1 addition & 1 deletion reference/gearman/gearmanclient/donormal.xml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ do
case GEARMAN_WORK_FAIL:
echo "Falhou\n";
exit;
case GEARMAN_Sucesso:
case GEARMAN_SUCCESS:
break;
default:
echo "RET: " . $gmclient->returnCode() . "\n";
Expand Down
2 changes: 1 addition & 1 deletion reference/gearman/gearmanclient/dostatus.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ do
case GEARMAN_WORK_FAIL:
echo "Falhou\n";
exit;
case GEARMAN_Sucesso:
case GEARMAN_SUCCESS:
break;
default:
echo "RET: " . $gmclient->returnCode() . "\n";
Expand Down
2 changes: 1 addition & 1 deletion reference/gmp/functions/gmp-jacobi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ echo gmp_jacobi("2", "3") . "\n";
<screen>
<![CDATA[
1

0
]]>
</screen>
</example>
Expand Down
2 changes: 1 addition & 1 deletion reference/gmp/functions/gmp-legendre.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ echo gmp_legendre("2", "3") . "\n";
<screen>
<![CDATA[
1

0
]]>
</screen>
</example>
Expand Down
2 changes: 1 addition & 1 deletion reference/intl/intlcalendar/gettype.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<![CDATA[
<?php
ini_set('date.timezone', 'Europe/Lisbon');
ini_set('intl.default_locale', 'pr_BR');
ini_set('intl.default_locale', 'pt_BR');

$cal = IntlCalendar::createInstance(NULL, '@calendar=ethiopic-amete-alem');
var_dump($cal->getType());
Expand Down
2 changes: 1 addition & 1 deletion reference/pgsql/functions/pg-field-prtlen.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
<programlisting role="php">
<![CDATA[
<?php
$dbconn = pg_connect("dbname=publisher") or die(" connect");
$dbconn = pg_connect("dbname=publisher") or die("Could not connect");

$res = pg_query($dbconn, "select * from authors where author = 'Orwell'");
$i = pg_num_fields($res);
Expand Down
2 changes: 1 addition & 1 deletion reference/posix/functions/posix-setgid.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<programlisting role="php">
<![CDATA[
<?php
cho 'Meu ID de grupo real é ' . posix_getgid(); // 20
echo 'Meu ID de grupo real é ' . posix_getgid(); // 20
posix_setgid(40);
echo 'Meu ID de grupo real é ' . posix_getgid(); // 40
echo 'Meu ID de grupo efetivo é ' . posix_getegid(); // 40
Expand Down
2 changes: 1 addition & 1 deletion reference/strings/functions/ltrim.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Retira espaços em branco (ou outros caracteres) do início de uma string.
</simpara>
<simpara>
Se o segundo parâmetro,
Sem o segundo parâmetro,
<function>mb_ltrim</function> removerá os seguintes caracteres:
</simpara>
&strings.stripped.characters;
Expand Down
2 changes: 1 addition & 1 deletion reference/strings/functions/str-pad.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
<programlisting role="php">
<![CDATA[
<?php
$input = "Alien", PHP_EOL;
$input = "Alien";
echo str_pad($input, 10), PHP_EOL; // produz "Alien "
echo str_pad($input, 10, "-=", STR_PAD_LEFT), PHP_EOL; // produz "-=-=-Alien"
echo str_pad($input, 10, "_", STR_PAD_BOTH), PHP_EOL; // produz "__Alien___"
Expand Down
2 changes: 1 addition & 1 deletion reference/strings/functions/strspn.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ $var = strspn("42 is the answer to the 128th question.", "1234567890");
<term><parameter>string</parameter></term>
<listitem>
<para>
A primeira a ser examinada.
A primeira string a ser examinada.
</para>
</listitem>
</varlistentry>
Expand Down
4 changes: 2 additions & 2 deletions reference/xmlwriter/examples.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ echo xmlwriter_output_memory($xw);
<!--isto é um comentário.-->
<tag11>Este é um texto de exemplo, ä</tag11>
</tag1>
<testc><![CDATA[Isto é conteúdo cdata]]]]><![CDATA[></testc>
<testc><![CDATA[teste cdata2]]]]><![CDATA[></testc>
<testec><![CDATA[Isto é conteúdo cdata]]]]><![CDATA[></testec>
<testec><![CDATA[teste cdata2]]]]><![CDATA[></testec>
<?php $foo=2;echo $foo;?>
]]>
</screen>
Expand Down
2 changes: 1 addition & 1 deletion reference/yar/yar_server/handle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<?php
class API {
/**
* Ss informações do documento serão geradas automaticamente na página de informações do serviço.
* As informações do documento serão geradas automaticamente na página de informações do serviço.
* @params
* @return
*/
Expand Down
2 changes: 1 addition & 1 deletion reference/zmq/zmqsocket/construct.xml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function novo_socket_cb(ZMQSocket $socket, $id_persistente = null)
$contexto = new ZMQContext();

/* Cria um novo socket */
$socket = $context->getSocket(ZMQ::SOCKET_REP, 'servidor', 'novo_socket_cb');
$socket = $contexto->getSocket(ZMQ::SOCKET_REP, 'servidor', 'novo_socket_cb');

$mensagem = $socket->recv();
echo "Mensagem recebida: {$mensagem}\n";
Expand Down
Loading