{"id":7065,"date":"2013-03-05T14:26:47","date_gmt":"2013-03-05T19:26:47","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=7065"},"modified":"2013-03-05T14:26:47","modified_gmt":"2013-03-05T19:26:47","slug":"bypassing-php-strcmp","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2013\/03\/05\/bypassing-php-strcmp\/","title":{"rendered":"Bypassing PHP strcmp()"},"content":{"rendered":"<p><a href=\"http:\/\/danuxx.blogspot.com\/2013\/03\/unauthorized-access-bypassing-php-strcmp.html\">Daniel Regalado<\/a> reports on how PHP&rsquo;s <code>strcmp()<\/code> returns <code>NULL<\/code> when comparing a string with a non-string, and how if your code uses <code>==<\/code> (which sees <code>NULL<\/code> as <code>0<\/code>) instead of <code>===<\/code> it will erroneously think the two are equal (via <a href=\"https:\/\/twitter.com\/cbarrett\/status\/308994051741474816\">Colin Barrett<\/a>).<\/p>","protected":false},"excerpt":{"rendered":"<p>Daniel Regalado reports on how PHP&rsquo;s strcmp() returns NULL when comparing a string with a non-string, and how if your code uses == (which sees NULL as 0) instead of === it will erroneously think the two are equal (via Colin Barrett).<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[359,71,48],"class_list":["post-7065","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-php","tag-programming","tag-security"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/7065","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=7065"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/7065\/revisions"}],"predecessor-version":[{"id":7066,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/7065\/revisions\/7066"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=7065"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=7065"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=7065"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}