From c3ac2738e5a5230df3fafcd08dbb61904d66b730 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=8A=A0=E5=85=B4?= <977904037@qq.com> Date: Thu, 4 Apr 2019 09:47:19 +0800 Subject: [PATCH] Update main.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 变量挪到比较运算符右侧 --- php/07_linkedlist/main.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/php/07_linkedlist/main.php b/php/07_linkedlist/main.php index 736b048..4cd9b31 100644 --- a/php/07_linkedlist/main.php +++ b/php/07_linkedlist/main.php @@ -191,7 +191,7 @@ Class SingleLinkedListAlgo ++$i; } - if ($fast == null) { + if (null == $fast) { return true; } @@ -305,4 +305,4 @@ echo '---------------------- 求链表的中间结点 ----------------------' . $listAlgo->setList($list); $middleNode = $listAlgo->findMiddleNode(); var_dump($middleNode->data); -echo '-------------------------------------------------------------'. PHP_EOL . PHP_EOL; \ No newline at end of file +echo '-------------------------------------------------------------'. PHP_EOL . PHP_EOL;