Doc #71022 [NEW]: the translation of usage of Spaceship operator is wrong.
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)
- seekerliu at vip dot qq dot com