{"id":16,"date":"2014-03-22T22:56:48","date_gmt":"2014-03-22T14:56:48","guid":{"rendered":"http:\/\/www.phpzl.com\/?p=15"},"modified":"2014-03-22T22:56:48","modified_gmt":"2014-03-22T14:56:48","slug":"php-abs-%e5%87%bd%e6%95%b0","status":"publish","type":"post","link":"http:\/\/www.phpzl.com\/?p=16","title":{"rendered":"PHP abs() \u51fd\u6570"},"content":{"rendered":"<h2>\u5b9a\u4e49\u548c\u7528\u6cd5<\/h2>\n<p>abs() \u51fd\u6570\u8fd4\u56de\u4e00\u4e2a\u6570\u7684\u7edd\u5bf9\u503c\u3002<\/p>\n<h3>\u8bed\u6cd5<\/h3>\n<pre>number <b>abs<\/b> ( mixed $number )<\/pre>\n<table>\n<tbody>\n<tr>\n<th>\u53c2\u6570<\/th>\n<th>\u63cf\u8ff0<\/th>\n<\/tr>\n<tr>\n<td><i><tt>number<\/tt><\/i><\/td>\n<td>\u5fc5\u9700\u3002\u4e00\u4e2a\u6570\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u8bf4\u660e<\/h3>\n<p>\u8fd4\u56de\u53c2\u6570\u00a0<i><tt>number<\/tt><\/i>\u00a0\u7684\u7edd\u5bf9\u503c\u3002\u5982\u679c\u53c2\u6570\u00a0<i>x<\/i>\u00a0\u662f float\uff0c\u5219\u8fd4\u56de\u7684\u7c7b\u578b\u4e5f\u662f float\uff0c\u5426\u5219\u8fd4\u56de integer\uff08\u56e0\u4e3a float \u901a\u5e38\u6bd4 integer \u6709\u66f4\u5927\u7684\u53d6\u503c\u8303\u56f4\uff09\u3002<\/p>\n<p><b>\u4f8b . <a href=\"http:\/\/www.phpzl.com\/archives\/15.html\" target=\"_blank\" rel=\"noopener\"><b>abs()<\/b> <\/a><\/b><\/p>\n<div><code>&lt;?php<br \/>\n$abs\u00a0=\u00a0abs(-4.2);\u00a0\/\/\u00a0$abs\u00a0=\u00a04.2;\u00a0(double\/float)<br \/>\n$abs2\u00a0=\u00a0abs(5);\u00a0\u00a0\u00a0\/\/\u00a0$abs2\u00a0=\u00a05;\u00a0(integer)<br \/>\n$abs3\u00a0=\u00a0abs(-5);\u00a0\u00a0\/\/\u00a0$abs3\u00a0=\u00a05;\u00a0(integer)<br \/>\n?&gt;<\/code><\/div>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p class=\"qua-blog-post-description\">\u5b9a\u4e49\u548c\u7528\u6cd5 abs() \u51fd\u6570\u8fd4\u56de\u4e00\u4e2a\u6570\u7684\u7edd\u5bf9\u503c\u3002 \u8bed\u6cd5 number abs ( mixed $number  [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"_links":{"self":[{"href":"http:\/\/www.phpzl.com\/index.php?rest_route=\/wp\/v2\/posts\/16"}],"collection":[{"href":"http:\/\/www.phpzl.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.phpzl.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.phpzl.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/www.phpzl.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=16"}],"version-history":[{"count":0,"href":"http:\/\/www.phpzl.com\/index.php?rest_route=\/wp\/v2\/posts\/16\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.phpzl.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=16"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.phpzl.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=16"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.phpzl.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=16"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}