From ef0067e1a4cf0b335c9480b80ecfdd8b241780f4 Mon Sep 17 00:00:00 2001 From: Daniele Alessandri Date: Sat, 16 Feb 2013 11:32:29 +0100 Subject: [PATCH] Use slightly faster version of the same code. Yet again, micro-optimizations here. --- lib/Predis/Connection/StreamConnection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Predis/Connection/StreamConnection.php b/lib/Predis/Connection/StreamConnection.php index b743c831..32ee29a0 100644 --- a/lib/Predis/Connection/StreamConnection.php +++ b/lib/Predis/Connection/StreamConnection.php @@ -101,7 +101,7 @@ class StreamConnection extends AbstractConnection stream_set_timeout($resource, $timeoutSeconds, $timeoutUSeconds); } - if (isset($parameters->tcp_nodelay) && version_compare(PHP_VERSION, '5.4.0', '>=')) { + if (isset($parameters->tcp_nodelay) && version_compare(PHP_VERSION, '5.4.0') >= 0) { $socket = socket_import_stream($resource); socket_set_option($socket, SOL_TCP, TCP_NODELAY, (int) $parameters->tcp_nodelay); }