Doc #71022 [Asn->Csd]: the translation of usage of Spaceship operator is wrong.
Edit report at https://bugs.php.net/bug.php?id=71022&edit=1
ID: 71022
Updated by: jhdxr@php.net
Reported by: seekerliu at vip dot qq dot com
Summary: the translation of usage of Spaceship operator is
wrong.
-Status: Assigned
+Status: Closed
Type: Documentation Problem
Package: Translation problem
Operating System: windows10
PHP Version: 7.0.0
Assigned To: jhdxr
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2015-12-23 08:04:20] jhdxr@php.net
Yep. It's my fault. Someone else had corrected the sentence to
"å½$a大äºãçäºæå°äº$bæ¶å®åå«è¿å1ã0æ-1",
however, he/she did not commit to svn. And after my commit (r338339), I found this problem and fix
it immediately, and now the doc online is correct. Thanks for your report.
------------------------------------------------------------------------
[2015-12-23 01:19:26] seekerliu at vip dot qq dot com
in the new documentation's XML sources also have a mistake:
"å¤ªç©ºè¹æä½ç¬¦ç¨äºæ¯è¾ä¸¤ä¸ªè¡¨è¾¾å¼ãå½<varname>$a</varname>å°äºãçäºæå¤§äº<varname>$b</varname>æ¶å®åå«è¿å1ã0æ-1ã"
the right version is:
"å¤ªç©ºè¹æä½ç¬¦ç¨äºæ¯è¾ä¸¤ä¸ªè¡¨è¾¾å¼ãå½<varname>$a</varname>å°äºãçäºæå¤§äº<varname>$b</varname>æ¶å®åå«è¿å-1ã0æ1ã"
对åºå
³ç³»ï¼
å½$a å°äº $b, è¿å -1
å½$a çäº $b, è¿å 0
å½$a å¤§äº $b, è¿å 1
------------------------------------------------------------------------
[2015-12-22 08:02:47] jhdxr@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation better.
------------------------------------------------------------------------
[2015-12-22 08:00:04] jhdxr@php.net
Automatic comment from SVN on behalf of jhdxr
Revision: http://svn.php.net/viewvc/?view=revision&revision=338339
Log: Fixed bug #71022 the translation of usage of Spaceship operator is wrong.
------------------------------------------------------------------------
[2015-12-04 01:52:35] seekerliu at vip dot qq dot com
Description:
------------
---
From manual page: http://www.php.net/migration70.new-features
---
æ¤å¥ä¸å¯¹âå¤ªç©ºè¹æä½ç¬¦âçä½ç¨ç¿»è¯ä¸ºï¼
å½$a大äºãçäºæå°äº$bæ¶å®åå«è¿å-1ã0æ1ã(incorrect)
å®é
åºä¸ºï¼
å½$aå°äºãçäºæå¤§äº$bæ¶å®åå«è¿å-1ã0æ1ã(correct)
å¦éè±æåçï¼
It returns -1, 0 or 1 when $a is respectively less than, equal to, or greater than $bã
Test script:
---------------
<?php
// Integers
echo 1 <=> 1; // 0
echo 1 <=> 2; // -1
echo 2 <=> 1; // 1
// Floats
echo 1.5 <=> 1.5; // 0
echo 1.5 <=> 2.5; // -1
echo 2.5 <=> 1.5; // 1
// Strings
echo "a" <=> "a"; // 0
echo "a" <=> "b"; // -1
echo "b" <=> "a"; // 1
?>
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=71022&edit=1
Thread (5 messages)