Doc #71022 [Opn->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: Open
+Status: Closed
Type: Documentation Problem
Package: Translation problem
Operating System: windows10
PHP Version: 7.0.0
-Assigned To:
+Assigned To: jhdxr
Block user comment: N
Private report: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[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)