{"id":53,"date":"2025-03-09T05:35:55","date_gmt":"2025-03-09T05:35:55","guid":{"rendered":"https:\/\/techkubo.com\/php\/?p=53"},"modified":"2025-05-23T17:53:22","modified_gmt":"2025-05-23T17:53:22","slug":"php-numbers","status":"publish","type":"post","link":"https:\/\/techkubo.com\/php\/php-numbers\/","title":{"rendered":"PHP Numbers"},"content":{"rendered":"\n<p>PHP has three primary types of numbers: Integers, Floats, and Number Strings. Additionally, there are special types like Infinity and NaN.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">PHP Numbers<\/h2>\n\n\n\n<p><strong>Main Numeric Types in PHP:<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Integer<\/strong>: Whole numbers without decimal points.<\/li>\n\n\n\n<li><strong>Float<\/strong>: Numbers with decimal points or in exponential form.<\/li>\n\n\n\n<li><strong>Number Strings<\/strong>: Strings that represent numeric values.<\/li>\n<\/ol>\n\n\n\n<p><strong>Special Numeric Types in PHP:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Infinity<\/strong>: Represents values larger than PHP_FLOAT_MAX.<\/li>\n\n\n\n<li><strong>NaN (Not a Number)<\/strong>: Used for invalid mathematical operations.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Creating Variables<\/h2>\n\n\n\n<p>To create numeric variables, simply assign values to them:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;php&quot;,&quot;mime&quot;:&quot;text\/x-php&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;PHP&quot;,&quot;language&quot;:&quot;PHP&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;php&quot;}\">$age = 25;\n$price = 399.99;\n$year = &quot;2025&quot;;<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Checking Variable Types<\/h2>\n\n\n\n<p>Use <code>var_dump()<\/code> to check the type of any variable:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;php&quot;,&quot;mime&quot;:&quot;text\/x-php&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;PHP&quot;,&quot;language&quot;:&quot;PHP&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;php&quot;}\">var_dump($age);\nvar_dump($price);\nvar_dump($year);<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">PHP Integers<\/h2>\n\n\n\n<p>An integer is a whole number without any decimal part. Here are a few examples: 10, -15, 2000. Integers in PHP can be between -2147483648 and 2147483647 on 32-bit systems, and much larger on 64-bit systems.<\/p>\n\n\n\n<p><strong>Rules for Integers:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Must have at least one digit<\/li>\n\n\n\n<li>No decimal point allowed<\/li>\n\n\n\n<li>Can be positive or negative<\/li>\n<\/ul>\n\n\n\n<p><strong>Constants for Integers:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>PHP_INT_MAX<\/code>: Maximum integer<\/li>\n\n\n\n<li><code>PHP_INT_MIN<\/code>: Minimum integer<\/li>\n\n\n\n<li><code>PHP_INT_SIZE<\/code>: Size of an integer in bytes<\/li>\n<\/ul>\n\n\n\n<p><strong>Functions to Check Integer Type:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>is_int()<\/code><\/li>\n\n\n\n<li><code>is_integer()<\/code> (alias of <code>is_int()<\/code>)<\/li>\n\n\n\n<li><code>is_long()<\/code> (alias of <code>is_int()<\/code>)<\/li>\n<\/ul>\n\n\n\n<p><strong>Example: Checking Integer Type<\/strong><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;php&quot;,&quot;mime&quot;:&quot;text\/x-php&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;PHP&quot;,&quot;language&quot;:&quot;PHP&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;php&quot;}\">$engine_capacity = 1200;\nvar_dump(is_int($engine_capacity));\n\n$engine_capacity = 1200.5;\nvar_dump(is_int($engine_capacity));<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">PHP Floats<\/h2>\n\n\n\n<p>A float is a number with a decimal point or in exponential form. Examples: 3.14, 0.001, 2.5E+3.<\/p>\n\n\n\n<p><strong>Constants for Floats:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>PHP_FLOAT_MAX<\/code>: Largest floating point number<\/li>\n\n\n\n<li><code>PHP_FLOAT_MIN<\/code>: Smallest positive floating point number<\/li>\n\n\n\n<li><code>PHP_FLOAT_DIG<\/code>: Number of decimal digits without precision loss<\/li>\n\n\n\n<li><code>PHP_FLOAT_EPSILON<\/code>: Smallest positive number <code>x<\/code> so that <code>x + 1.0 != 1.0<\/code><\/li>\n<\/ul>\n\n\n\n<p><strong>Functions to Check Float Type:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>is_float()<\/code><\/li>\n\n\n\n<li><code>is_double()<\/code> (alias of <code>is_float()<\/code>)<\/li>\n<\/ul>\n\n\n\n<p><strong>Example: Checking Float Type<\/strong><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;php&quot;,&quot;mime&quot;:&quot;text\/x-php&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;PHP&quot;,&quot;language&quot;:&quot;PHP&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;php&quot;}\">$mileage = 15.75;\nvar_dump(is_float($mileage));<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">PHP Infinity<\/h2>\n\n\n\n<p>Values larger than <code>PHP_FLOAT_MAX<\/code> are considered infinite.<\/p>\n\n\n\n<p><strong>Functions to Check Finite\/Infinite Values:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>is_finite()<\/code><\/li>\n\n\n\n<li><code>is_infinite()<\/code><\/li>\n<\/ul>\n\n\n\n<p><strong>Example: Checking Finite\/Infinite Value<\/strong><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;php&quot;,&quot;mime&quot;:&quot;text\/x-php&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;PHP&quot;,&quot;language&quot;:&quot;PHP&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;php&quot;}\">$speed = 1.8e309;\nvar_dump($speed);<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">PHP NaN<\/h2>\n\n\n\n<p>NaN stands for &#8220;Not a Number&#8221;. It results from invalid mathematical operations.<\/p>\n\n\n\n<p><strong>Function to Check NaN:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>is_nan()<\/code><\/li>\n<\/ul>\n\n\n\n<p><strong>Example: NaN Value<\/strong><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;php&quot;,&quot;mime&quot;:&quot;text\/x-php&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;PHP&quot;,&quot;language&quot;:&quot;PHP&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;php&quot;}\">$result = acos(8);\nvar_dump($result);<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">PHP Numerical Strings<\/h2>\n\n\n\n<p>To determine if a variable is numeric, use the <code>is_numeric()<\/code> function. It returns <code>true<\/code> if the variable is a number or a numeric string, and <code>false<\/code> otherwise.<\/p>\n\n\n\n<p><strong>Example: Checking Numeric Strings<\/strong><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;php&quot;,&quot;mime&quot;:&quot;text\/x-php&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;PHP&quot;,&quot;language&quot;:&quot;PHP&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;php&quot;}\">$model_number = 7500;\nvar_dump(is_numeric($model_number));\n\n$model_number = &quot;7500&quot;;\nvar_dump(is_numeric($model_number));\n\n$model_number = &quot;75.00&quot; + 100;\nvar_dump(is_numeric($model_number));\n\n$model_number = &quot;Speedster&quot;;\nvar_dump(is_numeric($model_number));<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Casting Strings and Floats to Integers<\/h2>\n\n\n\n<p>Sometimes you need to convert a value to an integer. Use <code>(int)<\/code>, <code>(integer)<\/code>, or <code>intval()<\/code> for this purpose.<\/p>\n\n\n\n<p><strong>Example: Casting to Integer<\/strong><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;php&quot;,&quot;mime&quot;:&quot;text\/x-php&quot;,&quot;theme&quot;:&quot;material&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;PHP&quot;,&quot;language&quot;:&quot;PHP&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;php&quot;}\">\/\/ Cast float to int\n$engine_capacity = 2345.678;\n$int_cast = (int)$engine_capacity;\necho $int_cast;\n\necho &quot;&lt;br&gt;&quot;;\n\n\/\/ Cast string to int\n$engine_capacity = &quot;2345.678&quot;;\n$int_cast = (int)$engine_capacity;\necho $int_cast;<\/pre><\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>PHP has three primary types of numbers: Integers, Floats, and Number Strings. Additionally, there are special types like Infinity and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-53","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>PHP Numbers - PHP Tutorial<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/techkubo.com\/php\/php-numbers\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PHP Numbers - PHP Tutorial\" \/>\n<meta property=\"og:description\" content=\"PHP has three primary types of numbers: Integers, Floats, and Number Strings. Additionally, there are special types like Infinity and [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/techkubo.com\/php\/php-numbers\/\" \/>\n<meta property=\"og:site_name\" content=\"PHP Tutorial\" \/>\n<meta property=\"article:published_time\" content=\"2025-03-09T05:35:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-05-23T17:53:22+00:00\" \/>\n<meta name=\"author\" content=\"Manong\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Manong\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/techkubo.com\/php\/php-numbers\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/techkubo.com\/php\/php-numbers\/\"},\"author\":{\"name\":\"Manong\",\"@id\":\"https:\/\/techkubo.com\/php\/#\/schema\/person\/b4fa2f01fa4ff2a4e98276ce47115965\"},\"headline\":\"PHP Numbers\",\"datePublished\":\"2025-03-09T05:35:55+00:00\",\"dateModified\":\"2025-05-23T17:53:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/techkubo.com\/php\/php-numbers\/\"},\"wordCount\":323,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/techkubo.com\/php\/#organization\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/techkubo.com\/php\/php-numbers\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/techkubo.com\/php\/php-numbers\/\",\"url\":\"https:\/\/techkubo.com\/php\/php-numbers\/\",\"name\":\"PHP Numbers - PHP Tutorial\",\"isPartOf\":{\"@id\":\"https:\/\/techkubo.com\/php\/#website\"},\"datePublished\":\"2025-03-09T05:35:55+00:00\",\"dateModified\":\"2025-05-23T17:53:22+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/techkubo.com\/php\/php-numbers\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/techkubo.com\/php\/php-numbers\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/techkubo.com\/php\/php-numbers\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/techkubo.com\/php\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PHP Numbers\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/techkubo.com\/php\/#website\",\"url\":\"https:\/\/techkubo.com\/php\/\",\"name\":\"PHP Tutorial\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/techkubo.com\/php\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/techkubo.com\/php\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/techkubo.com\/php\/#organization\",\"name\":\"PHP Tutorial\",\"url\":\"https:\/\/techkubo.com\/php\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/techkubo.com\/php\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/techkubo.com\/php\/wp-content\/uploads\/sites\/12\/2025\/04\/cropped-TechKubo-Logo-PNG.png\",\"contentUrl\":\"https:\/\/techkubo.com\/php\/wp-content\/uploads\/sites\/12\/2025\/04\/cropped-TechKubo-Logo-PNG.png\",\"width\":300,\"height\":220,\"caption\":\"PHP Tutorial\"},\"image\":{\"@id\":\"https:\/\/techkubo.com\/php\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/techkubo.com\/php\/#\/schema\/person\/b4fa2f01fa4ff2a4e98276ce47115965\",\"name\":\"Manong\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/techkubo.com\/php\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/21a7455736c21887b8fefe0935012d65?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/21a7455736c21887b8fefe0935012d65?s=96&d=mm&r=g\",\"caption\":\"Manong\"},\"sameAs\":[\"https:\/\/techkubo.com\"],\"url\":\"https:\/\/techkubo.com\/php\/author\/manong\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PHP Numbers - PHP Tutorial","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/techkubo.com\/php\/php-numbers\/","og_locale":"en_US","og_type":"article","og_title":"PHP Numbers - PHP Tutorial","og_description":"PHP has three primary types of numbers: Integers, Floats, and Number Strings. Additionally, there are special types like Infinity and [&hellip;]","og_url":"https:\/\/techkubo.com\/php\/php-numbers\/","og_site_name":"PHP Tutorial","article_published_time":"2025-03-09T05:35:55+00:00","article_modified_time":"2025-05-23T17:53:22+00:00","author":"Manong","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Manong","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/techkubo.com\/php\/php-numbers\/#article","isPartOf":{"@id":"https:\/\/techkubo.com\/php\/php-numbers\/"},"author":{"name":"Manong","@id":"https:\/\/techkubo.com\/php\/#\/schema\/person\/b4fa2f01fa4ff2a4e98276ce47115965"},"headline":"PHP Numbers","datePublished":"2025-03-09T05:35:55+00:00","dateModified":"2025-05-23T17:53:22+00:00","mainEntityOfPage":{"@id":"https:\/\/techkubo.com\/php\/php-numbers\/"},"wordCount":323,"commentCount":0,"publisher":{"@id":"https:\/\/techkubo.com\/php\/#organization"},"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/techkubo.com\/php\/php-numbers\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/techkubo.com\/php\/php-numbers\/","url":"https:\/\/techkubo.com\/php\/php-numbers\/","name":"PHP Numbers - PHP Tutorial","isPartOf":{"@id":"https:\/\/techkubo.com\/php\/#website"},"datePublished":"2025-03-09T05:35:55+00:00","dateModified":"2025-05-23T17:53:22+00:00","breadcrumb":{"@id":"https:\/\/techkubo.com\/php\/php-numbers\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/techkubo.com\/php\/php-numbers\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/techkubo.com\/php\/php-numbers\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/techkubo.com\/php\/"},{"@type":"ListItem","position":2,"name":"PHP Numbers"}]},{"@type":"WebSite","@id":"https:\/\/techkubo.com\/php\/#website","url":"https:\/\/techkubo.com\/php\/","name":"PHP Tutorial","description":"","publisher":{"@id":"https:\/\/techkubo.com\/php\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/techkubo.com\/php\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/techkubo.com\/php\/#organization","name":"PHP Tutorial","url":"https:\/\/techkubo.com\/php\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techkubo.com\/php\/#\/schema\/logo\/image\/","url":"https:\/\/techkubo.com\/php\/wp-content\/uploads\/sites\/12\/2025\/04\/cropped-TechKubo-Logo-PNG.png","contentUrl":"https:\/\/techkubo.com\/php\/wp-content\/uploads\/sites\/12\/2025\/04\/cropped-TechKubo-Logo-PNG.png","width":300,"height":220,"caption":"PHP Tutorial"},"image":{"@id":"https:\/\/techkubo.com\/php\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/techkubo.com\/php\/#\/schema\/person\/b4fa2f01fa4ff2a4e98276ce47115965","name":"Manong","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techkubo.com\/php\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/21a7455736c21887b8fefe0935012d65?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/21a7455736c21887b8fefe0935012d65?s=96&d=mm&r=g","caption":"Manong"},"sameAs":["https:\/\/techkubo.com"],"url":"https:\/\/techkubo.com\/php\/author\/manong\/"}]}},"_links":{"self":[{"href":"https:\/\/techkubo.com\/php\/wp-json\/wp\/v2\/posts\/53"}],"collection":[{"href":"https:\/\/techkubo.com\/php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techkubo.com\/php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techkubo.com\/php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techkubo.com\/php\/wp-json\/wp\/v2\/comments?post=53"}],"version-history":[{"count":2,"href":"https:\/\/techkubo.com\/php\/wp-json\/wp\/v2\/posts\/53\/revisions"}],"predecessor-version":[{"id":190,"href":"https:\/\/techkubo.com\/php\/wp-json\/wp\/v2\/posts\/53\/revisions\/190"}],"wp:attachment":[{"href":"https:\/\/techkubo.com\/php\/wp-json\/wp\/v2\/media?parent=53"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techkubo.com\/php\/wp-json\/wp\/v2\/categories?post=53"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techkubo.com\/php\/wp-json\/wp\/v2\/tags?post=53"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}