Doc #71022 [NEW]: the translation of usage of Spaceship operator is wrong.

From: Date: Fri, 04 Dec 2015 01:52:36 +0000
Subject: Doc #71022 [NEW]: the translation of usage of Spaceship operator is wrong.
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-12901@lists.php.net to get a copy of this message
From:             seekerliu at vip dot qq dot com
Operating system: windows10
PHP version:      7.0.0
Package:          Translation problem
Bug Type:         Documentation Problem
Bug description:the translation of usage of Spaceship operator is wrong.

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 bug report at https://bugs.php.net/bug.php?id=71022&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=71022&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=71022&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=71022&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=71022&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=71022&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=71022&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=71022&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=71022&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=71022&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=71022&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=71022&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=71022&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=71022&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71022&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=71022&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=71022&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=71022&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=71022&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=71022&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=71022&r=mysqlcfg



Thread (5 messages)

« previous php.doc.bugs (#12901) next »