<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: php와 unsigned int</title>
	<atom:link href="http://www.jiniya.net/wp/archives/239/feed" rel="self" type="application/rss+xml" />
	<link>http://www.jiniya.net/wp/archives/239</link>
	<description>컴퓨터의 깊이를 재기 위해, 컴퓨터 속으로 들어간 개발자 이야기...</description>
	<lastBuildDate>Fri, 10 Feb 2012 10:03:35 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: 미니어스</title>
		<link>http://www.jiniya.net/wp/archives/239/comment-page-1#comment-5728</link>
		<dc:creator>미니어스</dc:creator>
		<pubDate>Fri, 05 Feb 2010 06:50:02 +0000</pubDate>
		<guid isPermaLink="false">http://jiniya.net/wp/?p=239#comment-5728</guid>
		<description>비슷한 내용이라서 링크 남겨둡니다. 

http://phpschool.com/gnuboard4/bbs/board.php?bo_table=talkbox&amp;wr_id=1680531&amp;cwin=#c_1680560</description>
		<content:encoded><![CDATA[<p>비슷한 내용이라서 링크 남겨둡니다. </p>
<p><a href="http://phpschool.com/gnuboard4/bbs/board.php?bo_table=talkbox&#038;wr_id=1680531&#038;cwin=#c_1680560" rel="nofollow">http://phpschool.com/gnuboard4/bbs/board.php?bo_table=talkbox&#038;wr_id=1680531&#038;cwin=#c_1680560</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: codewiz</title>
		<link>http://www.jiniya.net/wp/archives/239/comment-page-1#comment-84</link>
		<dc:creator>codewiz</dc:creator>
		<pubDate>Wed, 15 Jul 2009 11:51:53 +0000</pubDate>
		<guid isPermaLink="false">http://jiniya.net/wp/?p=239#comment-84</guid>
		<description>람다// 답글 잘 보았습니다. ㅎㅎ^^;; 
floatval을 쓰면 간단하게 해결할 수 있는 문제였군요.
정수라고 생각한건 3000000000이 정수기 때문이죠. 

저도 댓글 수정 기능이 있는지 없는지, 어디 있는지 모르겠네용 ㅋㅋㅋ~
좋은 댓글 감사합니다...</description>
		<content:encoded><![CDATA[<p>람다// 답글 잘 보았습니다. ㅎㅎ^^;;<br />
floatval을 쓰면 간단하게 해결할 수 있는 문제였군요.<br />
정수라고 생각한건 3000000000이 정수기 때문이죠. </p>
<p>저도 댓글 수정 기능이 있는지 없는지, 어디 있는지 모르겠네용 ㅋㅋㅋ~<br />
좋은 댓글 감사합니다&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 람다</title>
		<link>http://www.jiniya.net/wp/archives/239/comment-page-1#comment-83</link>
		<dc:creator>람다</dc:creator>
		<pubDate>Wed, 15 Jul 2009 08:53:16 +0000</pubDate>
		<guid isPermaLink="false">http://jiniya.net/wp/?p=239#comment-83</guid>
		<description>$arg = d2i(&#039;3000000000&#039;);

var_dump($arg);


function d2i($s)
{
 $r = 0;
 $len = strlen($s);
 for($i=0; $i&lt;$len; ++$i)
 {
  $r = $r * 10 + intval($s[$i]);
 }
 return $r;
}

의 결과도 결국은.. 
float(3000000000)





그럼에도 불구하고 printf에 %u 옵션이 있는건 아이러니 하네요.

$arg = intval(3000000000);
var_dump($arg);

를 해보면 결과는 
int(-1294967296) 입니다.

아마 C의 printf 호환성을 위해 있는게 아닐까 짐작을 해봅니다.</description>
		<content:encoded><![CDATA[<p>$arg = d2i(&#8217;3000000000&#8242;);</p>
<p>var_dump($arg);</p>
<p>function d2i($s)<br />
{<br />
 $r = 0;<br />
 $len = strlen($s);<br />
 for($i=0; $i&lt;$len; ++$i)<br />
 {<br />
  $r = $r * 10 + intval($s[$i]);<br />
 }<br />
 return $r;<br />
}</p>
<p>의 결과도 결국은..<br />
float(3000000000)</p>
<p>그럼에도 불구하고 printf에 %u 옵션이 있는건 아이러니 하네요.</p>
<p>$arg = intval(3000000000);<br />
var_dump($arg);</p>
<p>를 해보면 결과는<br />
int(-1294967296) 입니다.</p>
<p>아마 C의 printf 호환성을 위해 있는게 아닐까 짐작을 해봅니다.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 람다</title>
		<link>http://www.jiniya.net/wp/archives/239/comment-page-1#comment-82</link>
		<dc:creator>람다</dc:creator>
		<pubDate>Wed, 15 Jul 2009 08:46:38 +0000</pubDate>
		<guid isPermaLink="false">http://jiniya.net/wp/?p=239#comment-82</guid>
		<description>헛.. 댓글이 수정/삭제가 안되는군요...(제가 못 찾는건지..)

윗 댓글에서 쓰고 싶었던 코드는 
$arg = floatval(&#039;3000000000&#039;);
printf(”%u %08x”, $arg, $arg);

입니다. (3000000000에 따옴표가 빠졌네요.)</description>
		<content:encoded><![CDATA[<p>헛.. 댓글이 수정/삭제가 안되는군요&#8230;(제가 못 찾는건지..)</p>
<p>윗 댓글에서 쓰고 싶었던 코드는<br />
$arg = floatval(&#8217;3000000000&#8242;);<br />
printf(”%u %08x”, $arg, $arg);</p>
<p>입니다. (3000000000에 따옴표가 빠졌네요.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 람다</title>
		<link>http://www.jiniya.net/wp/archives/239/comment-page-1#comment-81</link>
		<dc:creator>람다</dc:creator>
		<pubDate>Wed, 15 Jul 2009 08:35:03 +0000</pubDate>
		<guid isPermaLink="false">http://jiniya.net/wp/?p=239#comment-81</guid>
		<description>PHP가 unsigned int를 지원 하지 안는데 궂이 3000000000이라는 숫자를 int라고 생각해야 하는 이유가 무엇인지요?

PHP int의 범위를 벗어날 경우가 있는 경우라면 float으로 생각해야 하는게 맞는 것 같습니다만..

$arg = floatval(3000000000);
printf(&quot;%u %08x&quot;, $arg, $arg);</description>
		<content:encoded><![CDATA[<p>PHP가 unsigned int를 지원 하지 안는데 궂이 3000000000이라는 숫자를 int라고 생각해야 하는 이유가 무엇인지요?</p>
<p>PHP int의 범위를 벗어날 경우가 있는 경우라면 float으로 생각해야 하는게 맞는 것 같습니다만..</p>
<p>$arg = floatval(3000000000);<br />
printf(&#8220;%u %08x&#8221;, $arg, $arg);</p>
]]></content:encoded>
	</item>
</channel>
</rss>

