{"id":3123,"date":"2019-01-01T18:51:26","date_gmt":"2019-01-01T13:21:26","guid":{"rendered":"http:\/\/reliablesoftwares.com\/blog\/?p=3123"},"modified":"2019-04-21T18:52:58","modified_gmt":"2019-04-21T13:22:58","slug":"use-integer-type-against-boolean","status":"publish","type":"post","link":"https:\/\/reliablesoftwares.com\/blog\/use-integer-type-against-boolean\/","title":{"rendered":"Use Integer type against Boolean"},"content":{"rendered":"<p>It is much safer to use Integer type instead of Boolean. As a code compilation point of view, there is no specific gain in using boolean. Also, you get stuck with max 3 values in boolean (true, false, null). But if you use Integer you can increase the steps and there is no restriction on it.<\/p>\n<p>In my personal experience, I have come up with many scenarios where I had to change from Boolean to Integer as a value of the column increased to more than in 3 at a very later stage of a project. And changing then is frustrating and brings coding hell with it.<\/p>\n<p>Hence I strongly suggest using Integer type against Boolean. Let me know your views about the same.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It is much safer to use Integer type instead of Boolean. As a code compilation point of view, there is<\/p>\n","protected":false},"author":1,"featured_media":3124,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[3,8],"tags":[615,616],"class_list":["post-3123","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","category-programming","tag-boolean","tag-int"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/pgLsB5-On","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":3696,"url":"https:\/\/reliablesoftwares.com\/blog\/tetris-rush-classic-block-stacking-with-a-clock-strapped-to-every-stage\/","url_meta":{"origin":3123,"position":0},"title":"Tetris Rush: Classic Block-Stacking With a Clock Strapped to Every Stage","author":"saifuddin","date":"April 14, 2026","format":false,"excerpt":"Clear 5 lines in 56 seconds. Clear 7 lines in 50 seconds. Clear 12 lines in 36 seconds. The grid from the last stage is still there, half-filled with the debris of your survival. The pieces are falling faster. The clock is always running. Tetris Rush takes the universally understood\u2026","rel":"","context":"In &quot;AI&quot;","block_context":{"text":"AI","link":"https:\/\/reliablesoftwares.com\/blog\/category\/blog\/ai\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/reliablesoftwares.com\/blog\/wp-content\/uploads\/2026\/04\/tetris.jpeg?fit=540%2C1200&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/reliablesoftwares.com\/blog\/wp-content\/uploads\/2026\/04\/tetris.jpeg?fit=540%2C1200&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/reliablesoftwares.com\/blog\/wp-content\/uploads\/2026\/04\/tetris.jpeg?fit=540%2C1200&ssl=1&resize=525%2C300 1.5x"},"classes":[]}],"jetpack_likes_enabled":true,"jetpack_featured_media_url":"https:\/\/i0.wp.com\/reliablesoftwares.com\/blog\/wp-content\/uploads\/2019\/04\/matrix.jpeg?fit=900%2C300&ssl=1","_links":{"self":[{"href":"https:\/\/reliablesoftwares.com\/blog\/wp-json\/wp\/v2\/posts\/3123","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/reliablesoftwares.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/reliablesoftwares.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/reliablesoftwares.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/reliablesoftwares.com\/blog\/wp-json\/wp\/v2\/comments?post=3123"}],"version-history":[{"count":1,"href":"https:\/\/reliablesoftwares.com\/blog\/wp-json\/wp\/v2\/posts\/3123\/revisions"}],"predecessor-version":[{"id":3125,"href":"https:\/\/reliablesoftwares.com\/blog\/wp-json\/wp\/v2\/posts\/3123\/revisions\/3125"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/reliablesoftwares.com\/blog\/wp-json\/wp\/v2\/media\/3124"}],"wp:attachment":[{"href":"https:\/\/reliablesoftwares.com\/blog\/wp-json\/wp\/v2\/media?parent=3123"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/reliablesoftwares.com\/blog\/wp-json\/wp\/v2\/categories?post=3123"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/reliablesoftwares.com\/blog\/wp-json\/wp\/v2\/tags?post=3123"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}