{"id":7259,"date":"2019-10-20T11:36:41","date_gmt":"2019-10-20T11:36:41","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=7259"},"modified":"2022-05-08T12:07:23","modified_gmt":"2022-05-08T12:07:23","slug":"beginner-guide-of-php-general-types","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/beginner-guide-of-php-general-types\/","title":{"rendered":"Beginner guide of PHP General Types"},"content":{"rendered":"\n<p class=\"has-medium-font-size\"><strong>PHP General Types means Basics of PHP programming language:-<\/strong><\/p>\n\n\n\n<p><strong>Comments &amp; case-sensitivity Variables Includes below topic:-<\/strong><\/p>\n\n\n\n<p>Integers, Booleans, Decimals, Constants <\/p>\n\n\n\n<p><strong>Using built and functions determine types:-<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>This model are very basics some few basics:-<\/strong><\/p>\n\n\n\n<p><strong>You can write different types of Comments symbol in PHP:-<\/strong><\/p>\n\n\n\n<p><strong>&#8220;\/\/&#8221;     <\/strong>called C++ line comment<br><strong> &#8220;\/<\/strong><em><strong>&#8212;&#8212;&#8212;&#8212;&#8212;-<\/strong><\/em><strong>\/&#8221;<\/strong>       called C-style comment block<br><strong> &#8220;#&#8221; <\/strong>         called Shell Style comment<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Case Sensitivity:-<\/strong><\/p>\n\n\n\n<p>Capacity names are case-unfeeling, however it is normally great structure to call works as they show up in their assertion. So as it is expressed, User-characterized capacities are not case touchy, the remainder of the language is case-sensitive though. Indeed PHP is case touchy language without a doubt.<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/Bitbuckettraining\/19d8f80607f487065c71c1fed67368e8.js\"><\/script>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Integers:-<\/strong><\/p>\n\n\n\n<p>A integer number must have at any rate one digit (0-9). No comma or spaces are allowed inside a whole number. <\/p>\n\n\n\n<p>It must not have a decimal point. <\/p>\n\n\n\n<p>It could be either positive or negative if no sign goes before it is thought to be certain. <\/p>\n\n\n\n<p>Integer numbers can be determined in three organizations, decimal (10-based), hexadecimal (16-based) (prefixed with 0x) or octal (8-based) (prefixed with 0) documentation, alternatively went before by a &#8211; or + sign. <\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/Bitbuckettraining\/8690f320a743adfa9cccb8899f4678df.js\"><\/script>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Decimal:- <\/strong><\/p>\n\n\n\n<p>Decimal floating-point (DFP) arithmetic refers  to both a representation and activities on decimal floating-point numbers. Working directly with decimal (base-10) portions can keep away from the adjusting blunders that generally normally happen when changing over between decimal divisions.<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/Bitbuckettraining\/e2368d11e501467742c1c30c199015e5.js\"><\/script>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Booleans:-<\/strong><\/p>\n\n\n\n<p>Booleans are an extremely fundamental thing, they are a simply like double. This is to state you either have a 1 or a zero, a genuine or a bogus worth. Booleans can either be valid or false, that is it. In the event that it is valid, this doesn&#8217;t implies the string genuine or the number 1, it is basically a truthy esteem. They are extremely valuable in programming since we can utilize them to perform different tests.<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/Bitbuckettraining\/2565d9ebe4e13a0d77e233232b4c1a48.js\"><\/script>\n\n\n\n<p> <\/p>\n\n\n\n<p><strong>((result)) &#8212;<\/strong><br> boolean true<br> boolean false<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Constants:- <\/strong><\/p>\n\n\n\n<p>A constant can hold just a scalar or a  simple value, for example, integer, float, string or Boolean.  When a constant is characterized, it very well may be available from anyplace in the content.<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/Bitbuckettraining\/268c3a84c71b31eb615a271043068719.js\"><\/script>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Determine Variable Types:-<\/strong><\/p>\n\n\n\n<p>It changes over a variable&#8217;s information type automatically, depending on the context  in which the variable is utilized. For instance, you can instate a variable with a integer value, enhance it, along these lines transforming it into a float, at that point go along with it onto a string value to deliver a string.<\/p>\n\n\n\n<p>\/\/integer<br>\n$var = 1;<\/p>\n\n\n\n<p>\/\/float<br>\n$var += 0.1; \/\/1.1<\/p>\n\n\n\n<p>\/\/string<br> $var .= &#8216; abc&#8217;; \/\/ 1.1 abc<\/p>\n\n\n\n<p>is_int( )          Return true if value is an integer<br> is_float( )      Return true if value is a float<br> is_string( )    Return true if value is a string<br> is_bool( )      Return true if value is a boolean<br> is_array( )    Return true if value is a array<br> is_object( )    Return true if value is a object<br> is_resource()    Return true if value is a resource<br> is_null( )            Return true if value is a null<br> is_numeric( )    Return true if value is a number (such as, a numeric string or float)<br> is_scalar( )        Return true if value is a null<\/p>\n\n\n<div class=\"epyt-gallery\" data-currpage=\"1\" id=\"epyt_gallery_21821\"><iframe loading=\"lazy\"  id=\"_ytid_57848\"  width=\"760\" height=\"427\"  data-origwidth=\"760\" data-origheight=\"427\" src=\"https:\/\/www.youtube.com\/embed\/?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=0&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=1&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;\" class=\"__youtube_prefs__  no-lazyload\" title=\"YouTube player\"  data-epytgalleryid=\"epyt_gallery_21821\"  allow=\"fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen data-no-lazy=\"1\" data-skipgform_ajax_framebjll=\"\"><\/iframe><div class=\"epyt-gallery-list\"><div>Sorry, there was a YouTube error.<\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>PHP General Types means Basics of PHP programming language:- Comments &amp; case-sensitivity Variables Includes below topic:- Integers, Booleans, Decimals, Constants Using built and functions determine types:- This model are very&#8230; <\/p>\n","protected":false},"author":1,"featured_media":7260,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[5150],"tags":[1569,1243,2731,1122,177,5427],"class_list":["post-7259","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php","tag-basics","tag-beginner","tag-general","tag-guide","tag-php","tag-types"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/7259","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=7259"}],"version-history":[{"count":25,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/7259\/revisions"}],"predecessor-version":[{"id":25376,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/7259\/revisions\/25376"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media\/7260"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=7259"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=7259"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=7259"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}