{"id":11912,"date":"2022-09-22T07:30:23","date_gmt":"2022-09-22T07:30:23","guid":{"rendered":"https:\/\/www.webhozz.com\/blog\/?p=11912"},"modified":"2023-05-11T06:28:22","modified_gmt":"2023-05-11T06:28:22","slug":"php-operator","status":"publish","type":"post","link":"https:\/\/www.webhozz.com\/blog\/php-operator\/","title":{"rendered":"PHP : Operator"},"content":{"rendered":"\n<p>Operator adalah simbol yang memberi tahu prosesor PHP untuk melakukan tindakan tertentu. Misalnya, simbol penambahan (&nbsp;<strong>+<\/strong>&nbsp;) adalah operator yang memberi tahu PHP untuk menambahkan dua variabel atau nilai, sedangkan simbol lebih besar dari (&nbsp;<strong>&gt;<\/strong>&nbsp;) adalah operator yang memberi tahu PHP untuk membandingkan dua nilai.<\/p>\n\n\n\n<p>Daftar berikut menjelaskan berbagai operator yang digunakan dalam PHP.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Operator Aritmatika PHP<\/h5>\n\n\n\n<p>Operator aritmatika digunakan untuk melakukan operasi aritmetika umum, seperti penambahan, pengurangan, penggandaan (multiplication), dll. Berikut adalah daftar lengkap operator aritmatika PHP:<\/p>\n\n\n\n<table class=\"wp-block-table\"><tbody><tr><th>Operator<\/th><th>Description<\/th><th>Example<\/th><th>Result<\/th><\/tr><tr><td><code>+<\/code><\/td><td>Addition<\/td><td><code>$x + $y<\/code><\/td><td>Sum of $x and $y<\/td><\/tr><tr><td><code>-<\/code><\/td><td>Subtraction<\/td><td><code>$x - $y<\/code><\/td><td>Difference of $x and $y.<\/td><\/tr><tr><td><code>*<\/code><\/td><td>Multiplication<\/td><td><code>$x * $y<\/code><\/td><td>Product of $x and $y.<\/td><\/tr><tr><td><code>\/<\/code><\/td><td>Division<\/td><td><code>$x \/ $y<\/code><\/td><td>Quotient of $x and $y<\/td><\/tr><tr><td><code>%<\/code><\/td><td>Modulus<\/td><td><code>$x % $y<\/code><\/td><td>Remainder of $x divided by $y<\/td><\/tr><\/tbody><\/table>\n\n\n\n<p>Contoh berikut akan menunjukkan kepada kalian bagaimana operator aritmatika ini bekerja:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n&lt;?php\n$x = 10;\n$y = 4;\necho($x + $y); \/\/ 0utputs: 14\necho($x - $y); \/\/ 0utputs: 6\necho($x * $y); \/\/ 0utputs: 40\necho($x \/ $y); \/\/ 0utputs: 2.5\necho($x % $y); \/\/ 0utputs: 2\n?&gt;\n<\/pre><\/div>\n\n\n<h5 class=\"wp-block-heading\">Operator Assignment PHP<\/h5>\n\n\n\n<p>Operator assignment digunakan untuk menetapkan nilai ke variabel.<\/p>\n\n\n\n<table class=\"wp-block-table\"><tbody><tr><th>Operator<\/th><th>Description<\/th><th>Example<\/th><th>Is The Same As<\/th><\/tr><tr><td><code>=<\/code><\/td><td>Assign<\/td><td><code>$x = $y<\/code><\/td><td><code>$x = $y<\/code><\/td><\/tr><tr><td><code>+=<\/code><\/td><td>Add and assign<\/td><td><code>$x += $y<\/code><\/td><td><code>$x = $x + $y<\/code><\/td><\/tr><tr><td><code>-=<\/code><\/td><td>Subtract and assign<\/td><td><code>$x -= $y<\/code><\/td><td><code>$x = $x - $y<\/code><\/td><\/tr><tr><td><code>*=<\/code><\/td><td>Multiply and assign<\/td><td><code>$x *= $y<\/code><\/td><td><code>$x = $x * $y<\/code><\/td><\/tr><tr><td><code>\/=<\/code><\/td><td>Divide and assign quotient<\/td><td><code>$x \/= $y<\/code><\/td><td><code>$x = $x \/ $y<\/code><\/td><\/tr><tr><td><code>%=<\/code><\/td><td>Divide and assign modulus<\/td><td><code>$x %= $y<\/code><\/td><td><code>$x = $x % $y<\/code><\/td><\/tr><\/tbody><\/table>\n\n\n\n<p>Contoh berikut akan menunjukkan kepada kalian bagaimana operator assignment ini bekerja:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n&lt;?php\n$x = 10;\necho $x; \/\/ Outputs: 10\n  \n$x = 20;\n$x += 30;\necho $x; \/\/ Outputs: 50\n  \n$x = 50;\n$x -= 20;\necho $x; \/\/ Outputs: 30\n  \n$x = 5;\n$x *= 25;\necho $x; \/\/ Outputs: 125\n  \n$x = 50;\n$x \/= 10;\necho $x; \/\/ Outputs: 5\n  \n$x = 100;\n$x %= 15;\necho $x; \/\/ Outputs: 10\n?&gt;\n<\/pre><\/div>\n\n\n<h5 class=\"wp-block-heading\">Operator Perbandingan PHP<\/h5>\n\n\n\n<p>Operator pembanding digunakan untuk membandingkan dua nilai secara Boolean.<\/p>\n\n\n\n<table class=\"wp-block-table\"><tbody><tr><th>Operator<\/th><th>Name<\/th><th>Example<\/th><th>Result<\/th><\/tr><tr><td><code>==<\/code><\/td><td>Equal<\/td><td><code>$x == $y<\/code><\/td><td>True if $x is equal to $y<\/td><\/tr><tr><td><code>===<\/code><\/td><td>Identical<\/td><td><code>$x === $y<\/code><\/td><td>True if $x is equal to $y, and they are of the same type<\/td><\/tr><tr><td><code>!=<\/code><\/td><td>Not equal<\/td><td><code>$x != $y<\/code><\/td><td>True if $x is not equal to $y<\/td><\/tr><tr><td><code>&lt;&gt;<\/code><\/td><td>Not equal<\/td><td><code>$x &lt;&gt; $y<\/code><\/td><td>True if $x is not equal to $y<\/td><\/tr><tr><td><code>!==<\/code><\/td><td>Not identical<\/td><td><code>$x !== $y<\/code><\/td><td>True if $x is not equal to $y, or they are not of the same type<\/td><\/tr><tr><td><code>&lt;<\/code><\/td><td>Less than<\/td><td><code>$x &lt; $y<\/code><\/td><td>True if $x is less than $y<\/td><\/tr><tr><td><code>&gt;<\/code><\/td><td>Greater than<\/td><td><code>$x &gt; $y<\/code><\/td><td>True if $x is greater than $y<\/td><\/tr><tr><td><code>&gt;=<\/code><\/td><td>Greater than or equal to<\/td><td><code>$x &gt;= $y<\/code><\/td><td>True if $x is greater than or equal to $y<\/td><\/tr><tr><td><code>&lt;=<\/code><\/td><td>Less than or equal to<\/td><td><code>$x &lt;= $y<\/code><\/td><td>True if $x is less than or equal to $y<\/td><\/tr><\/tbody><\/table>\n\n\n\n<p>Contoh berikut akan menunjukkan kepada kalian bagaimana operator perbandingan ini bekerja:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n&lt;?php\n$x = 25;\n$y = 35;\n$z = &quot;25&quot;;\nvar_dump($x == $z);  \/\/ Outputs: boolean true\nvar_dump($x === $z); \/\/ Outputs: boolean false\nvar_dump($x != $y);  \/\/ Outputs: boolean true\nvar_dump($x !== $z); \/\/ Outputs: boolean true\nvar_dump($x &lt; $y);   \/\/ Outputs: boolean true\nvar_dump($x &gt; $y);   \/\/ Outputs: boolean false\nvar_dump($x &lt;= $y);  \/\/ Outputs: boolean true\nvar_dump($x &gt;= $y);  \/\/ Outputs: boolean false\n?&gt;\n<\/pre><\/div>\n\n\n<h5 class=\"wp-block-heading\">Operator Penambahan (Incrementing) dan Pengurangan (Decrementing) PHP<\/h5>\n\n\n\n<p>Operator penambahan \/ pengurangan digunakan untuk menambah \/ mengurangi nilai variabel.<\/p>\n\n\n\n<table class=\"wp-block-table\"><tbody><tr><th>Operator<\/th><th>Name<\/th><th>Effect<\/th><\/tr><tr><td><code>++$x<\/code><\/td><td>Pre-increment<\/td><td>Increments $x by one, then returns $x<\/td><\/tr><tr><td><code>$x++<\/code><\/td><td>Post-increment<\/td><td>Returns $x, then increments $x by one<\/td><\/tr><tr><td><code>--$x<\/code><\/td><td>Pre-decrement<\/td><td>Decrements $x by one, then returns $x<\/td><\/tr><tr><td><code>$x--<\/code><\/td><td>Post-decrement<\/td><td>Returns $x, then decrements $x by one<\/td><\/tr><\/tbody><\/table>\n\n\n\n<p>Contoh berikut akan menunjukkan kepada kalian bagaimana operator penambahan dan pengurangan ini bekerja:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n&lt;?php\n$x = 10;\necho ++$x; \/\/ Outputs: 11\necho $x;   \/\/ Outputs: 11\n  \n$x = 10;\necho $x++; \/\/ Outputs: 10\necho $x;   \/\/ Outputs: 11\n  \n$x = 10;\necho --$x; \/\/ Outputs: 9\necho $x;   \/\/ Outputs: 9\n  \n$x = 10;\necho $x--; \/\/ Outputs: 10\necho $x;   \/\/ Outputs: 9\n?&gt;\n<\/pre><\/div>\n\n\n<h5 class=\"wp-block-heading\">Operator Logical PHP&nbsp;<\/h5>\n\n\n\n<p>Operator logis biasanya digunakan untuk menggabungkan pernyataan conditional.<\/p>\n\n\n\n<table class=\"wp-block-table\"><tbody><tr><th>Operator<\/th><th>Name<\/th><th>Example<\/th><th>Result<\/th><\/tr><tr><td><code>and<\/code><\/td><td>And<\/td><td><code>$x and $y<\/code><\/td><td>True if both $x and $y are true<\/td><\/tr><tr><td><code>or<\/code><\/td><td>Or<\/td><td><code>$x or $y<\/code><\/td><td>True if either $x or $y is true<\/td><\/tr><tr><td><code>xor<\/code><\/td><td>Xor<\/td><td><code>$x xor $y<\/code><\/td><td>True if either $x or $y is true, but not both<\/td><\/tr><tr><td><code>&amp;&amp;<\/code><\/td><td>And<\/td><td><code>$x &amp;&amp; $y<\/code><\/td><td>True if both $x and $y are true<\/td><\/tr><tr><td><code>||<\/code><\/td><td>Or<\/td><td><code>$x || $y<\/code><\/td><td>True if either $$x or $y is true<\/td><\/tr><tr><td><code>!<\/code><\/td><td>Not<\/td><td><code>!$x<\/code><\/td><td>True if $x is not true<\/td><\/tr><\/tbody><\/table>\n\n\n\n<p>Contoh berikut akan menunjukkan kepada kalian bagaimana operator logis ini bekerja:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n&lt;?php\n$year = 2014;\n\/\/ Leap years are divisible by 400 or by 4 but not 100\nif(($year % 400 == 0) || (($year % 100 != 0) &amp;&amp; ($year % 4 == 0))){\n    echo &quot;$year is a leap year.&quot;;\n} else{\n    echo &quot;$year is not a leap year.&quot;;\n}\n?&gt;\n<\/pre><\/div>\n\n\n<h5 class=\"wp-block-heading\">Operator String PHP<\/h5>\n\n\n\n<p>Ada dua operator yang secara khusus dirancang untuk string.<\/p>\n\n\n\n<table class=\"wp-block-table\"><tbody><tr><th>Operator<\/th><th>Description<\/th><th>Example<\/th><th>Result<\/th><\/tr><tr><td><code>.<\/code><\/td><td>Concatenation<\/td><td><code>$str1 . $str2<\/code><\/td><td>Concatenation of $str1 and $str2<\/td><\/tr><tr><td><code>.=<\/code><\/td><td>Concatenation assignment<\/td><td><code>$str1 .= $str2<\/code><\/td><td>Appends the $str2 to the $str1<\/td><\/tr><\/tbody><\/table>\n\n\n\n<p>Contoh berikut akan menunjukkan kepada kalian bagaimana operator string ini bekerja:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n&lt;?php\n$x = &quot;Hello&quot;;\n$y = &quot; World!&quot;;\necho $x . $y; \/\/ Outputs: Hello World!\n  \n$x .= $y;\necho $x; \/\/ Outputs: Hello World!\n?&gt;\n<\/pre><\/div>\n\n\n<h5 class=\"wp-block-heading\">Operator Array PHP<\/h5>\n\n\n\n<p>Operator array digunakan untuk membandingkan array:<\/p>\n\n\n\n<table class=\"wp-block-table\"><tbody><tr><th>Operator<\/th><th>Name<\/th><th>Example<\/th><th>Result<\/th><\/tr><tr><td><code>+<\/code><\/td><td>Union<\/td><td><code>$x + $y<\/code><\/td><td>Union of $x and $y<\/td><\/tr><tr><td><code>==<\/code><\/td><td>Equality<\/td><td><code>$x == $y<\/code><\/td><td>True if $x and $y have the same key\/value pairs<\/td><\/tr><tr><td><code>===<\/code><\/td><td>Identity<\/td><td><code>$x === $y<\/code><\/td><td>True if $x and $y have the same key\/value pairs in the same order and of the same types<\/td><\/tr><tr><td><code>!=<\/code><\/td><td>Inequality<\/td><td><code>$x != $y<\/code><\/td><td>True if $x is not equal to $y<\/td><\/tr><tr><td><code>&lt;&gt;<\/code><\/td><td>Inequality<\/td><td><code>$x &lt;&gt; $y<\/code><\/td><td>True if $x is not equal to $y<\/td><\/tr><tr><td><code>!==<\/code><\/td><td>Non-identity<\/td><td><code>$x !== $y<\/code><\/td><td>True if $x is not identical to $y<\/td><\/tr><\/tbody><\/table>\n\n\n\n<p>Contoh berikut akan menunjukkan kepada kalian bagaimana operator array ini bekerja:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n&lt;?php\n$x = array(&quot;a&quot; =&gt; &quot;Red&quot;, &quot;b&quot; =&gt; &quot;Green&quot;, &quot;c&quot; =&gt; &quot;Blue&quot;);\n$y = array(&quot;u&quot; =&gt; &quot;Yellow&quot;, &quot;v&quot; =&gt; &quot;Orange&quot;, &quot;w&quot; =&gt; &quot;Pink&quot;);\n$z = $x + $y; \/\/ Union of $x and $y\nvar_dump($z);\nvar_dump($x == $y);   \/\/ Outputs: boolean false\nvar_dump($x === $y);  \/\/ Outputs: boolean false\nvar_dump($x != $y);   \/\/ Outputs: boolean true\nvar_dump($x &lt;&gt; $y);   \/\/ Outputs: boolean true\nvar_dump($x !== $y);  \/\/ Outputs: boolean true\n?&gt;\n<\/pre><\/div>\n\n\n<h5 class=\"wp-block-heading\">Operator PHP Spaceship PHP 7<\/h5>\n\n\n\n<p>PHP 7 memperkenalkan operator spaceship yang baru (<strong><em>&lt;=&gt;<\/em><\/strong>) yang dapat digunakan untuk membandingkan dua expression. Ia juga dikenal sebagai operator perbandingan gabungan.<\/p>\n\n\n\n<p>Operator spaceship mengembalikan&nbsp;<strong><em>0<\/em><\/strong>&nbsp;jika kedua operand sama,&nbsp;<strong><em>1<\/em><\/strong>&nbsp;jika kiri lebih besar, dan&nbsp;<strong><em>-1<\/em><\/strong>&nbsp;jika kanan lebih besar. Ini pada dasarnya menyediakan perbandingan three-way seperti yang ditunjukkan pada tabel berikut:<\/p>\n\n\n\n<table class=\"wp-block-table\"><thead><tr><th>Operator<\/th><th><code>&lt;=&gt;<\/code>&nbsp;Equivalent<\/th><\/tr><\/thead><tbody><tr><td><code>$x &lt; $y<\/code><\/td><td><code>($x &lt;=&gt; $y) === -1<\/code><\/td><\/tr><tr><td><code>$x &lt;= $y<\/code><\/td><td><code>($x &lt;=&gt; $y) === -1 || ($x &lt;=&gt; $y) === 0<\/code><\/td><\/tr><tr><td><code>$x == $y<\/code><\/td><td><code>($x &lt;=&gt; $y) === 0<\/code><\/td><\/tr><tr><td><code>$x != $y<\/code><\/td><td><code>($x &lt;=&gt; $y) !== 0<\/code><\/td><\/tr><tr><td><code>$x &gt;= $y<\/code><\/td><td><code>($x &lt;=&gt; $y) === 1 || ($x &lt;=&gt; $y) === 0<\/code><\/td><\/tr><tr><td><code>$x &gt; $y<\/code><\/td><td><code>($x &lt;=&gt; $y) === 1<\/code><\/td><\/tr><\/tbody><\/table>\n\n\n\n<p>Contoh berikut akan menunjukkan kepada kalian bagaimana operator spaceship ini bekerja:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n&lt;?php\n\/\/ Comparing Integers \necho 1 &lt;=&gt; 1; \/\/ Outputs: 0\necho 1 &lt;=&gt; 2; \/\/ Outputs: -1\necho 2 &lt;=&gt; 1; \/\/ Outputs: 1\n  \n\/\/ Comparing Floats\necho 1.5 &lt;=&gt; 1.5; \/\/ Outputs: 0\necho 1.5 &lt;=&gt; 2.5; \/\/ Outputs: -1\necho 2.5 &lt;=&gt; 1.5; \/\/ Outputs: 1\n  \n\/\/ Comparing Strings\necho &quot;x&quot; &lt;=&gt; &quot;x&quot;; \/\/ Outputs: 0\necho &quot;x&quot; &lt;=&gt; &quot;y&quot;; \/\/ Outputs: -1\necho &quot;y&quot; &lt;=&gt; &quot;x&quot;; \/\/ Outputs: 1\n?&gt;\n<\/pre><\/div>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Operator adalah simbol yang memberi tahu prosesor PHP untuk melakukan tindakan tertentu. Misalnya, simbol penambahan (&nbsp;+&nbsp;) adalah operator yang memberi tahu PHP untuk menambahkan dua<\/p>\n","protected":false},"author":1,"featured_media":11872,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-11912","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-belajar-web-programming"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>PHP : Operator - WebHozz Blog<\/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:\/\/www.webhozz.com\/blog\/php-operator\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PHP : Operator - WebHozz Blog\" \/>\n<meta property=\"og:description\" content=\"Operator adalah simbol yang memberi tahu prosesor PHP untuk melakukan tindakan tertentu. Misalnya, simbol penambahan (&nbsp;+&nbsp;) adalah operator yang memberi tahu PHP untuk menambahkan dua\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webhozz.com\/blog\/php-operator\/\" \/>\n<meta property=\"og:site_name\" content=\"WebHozz Blog\" \/>\n<meta property=\"article:published_time\" content=\"2022-09-22T07:30:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-05-11T06:28:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webhozz.com\/blog\/wp-content\/uploads\/2022\/09\/PHP_1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"750\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.webhozz.com\\\/blog\\\/php-operator\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.webhozz.com\\\/blog\\\/php-operator\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/www.webhozz.com\\\/blog\\\/#\\\/schema\\\/person\\\/d5f539ad171dc74baaf6a98dfef6fcef\"},\"headline\":\"PHP : Operator\",\"datePublished\":\"2022-09-22T07:30:23+00:00\",\"dateModified\":\"2023-05-11T06:28:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.webhozz.com\\\/blog\\\/php-operator\\\/\"},\"wordCount\":663,\"publisher\":{\"@id\":\"https:\\\/\\\/www.webhozz.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.webhozz.com\\\/blog\\\/php-operator\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.webhozz.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/09\\\/PHP_1.jpg\",\"articleSection\":[\"Belajar Web Programming\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.webhozz.com\\\/blog\\\/php-operator\\\/\",\"url\":\"https:\\\/\\\/www.webhozz.com\\\/blog\\\/php-operator\\\/\",\"name\":\"PHP : Operator - WebHozz Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.webhozz.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.webhozz.com\\\/blog\\\/php-operator\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.webhozz.com\\\/blog\\\/php-operator\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.webhozz.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/09\\\/PHP_1.jpg\",\"datePublished\":\"2022-09-22T07:30:23+00:00\",\"dateModified\":\"2023-05-11T06:28:22+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.webhozz.com\\\/blog\\\/php-operator\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.webhozz.com\\\/blog\\\/php-operator\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.webhozz.com\\\/blog\\\/php-operator\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.webhozz.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/09\\\/PHP_1.jpg\",\"contentUrl\":\"https:\\\/\\\/www.webhozz.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/09\\\/PHP_1.jpg\",\"width\":\"750\",\"height\":\"400\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.webhozz.com\\\/blog\\\/php-operator\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.webhozz.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PHP : Operator\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.webhozz.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.webhozz.com\\\/blog\\\/\",\"name\":\"WebHozz Blog\",\"description\":\"Kursus Web &amp; Android di Jakarta Bandung\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.webhozz.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.webhozz.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.webhozz.com\\\/blog\\\/#organization\",\"name\":\"WebHozz\",\"url\":\"https:\\\/\\\/www.webhozz.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.webhozz.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.webhozz.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/04\\\/logo-persegi.jpg\",\"contentUrl\":\"https:\\\/\\\/www.webhozz.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/04\\\/logo-persegi.jpg\",\"width\":442,\"height\":442,\"caption\":\"WebHozz\"},\"image\":{\"@id\":\"https:\\\/\\\/www.webhozz.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.webhozz.com\\\/blog\\\/#\\\/schema\\\/person\\\/d5f539ad171dc74baaf6a98dfef6fcef\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/bff35e4083f3870e2f911c4437e788147d340f274268d361dd7e1cf20bebb156?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/bff35e4083f3870e2f911c4437e788147d340f274268d361dd7e1cf20bebb156?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/bff35e4083f3870e2f911c4437e788147d340f274268d361dd7e1cf20bebb156?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"url\":\"https:\\\/\\\/www.webhozz.com\\\/blog\\\/author\\\/admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PHP : Operator - WebHozz Blog","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:\/\/www.webhozz.com\/blog\/php-operator\/","og_locale":"en_US","og_type":"article","og_title":"PHP : Operator - WebHozz Blog","og_description":"Operator adalah simbol yang memberi tahu prosesor PHP untuk melakukan tindakan tertentu. Misalnya, simbol penambahan (&nbsp;+&nbsp;) adalah operator yang memberi tahu PHP untuk menambahkan dua","og_url":"https:\/\/www.webhozz.com\/blog\/php-operator\/","og_site_name":"WebHozz Blog","article_published_time":"2022-09-22T07:30:23+00:00","article_modified_time":"2023-05-11T06:28:22+00:00","og_image":[{"width":750,"height":400,"url":"https:\/\/www.webhozz.com\/blog\/wp-content\/uploads\/2022\/09\/PHP_1.jpg","type":"image\/jpeg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webhozz.com\/blog\/php-operator\/#article","isPartOf":{"@id":"https:\/\/www.webhozz.com\/blog\/php-operator\/"},"author":{"name":"admin","@id":"https:\/\/www.webhozz.com\/blog\/#\/schema\/person\/d5f539ad171dc74baaf6a98dfef6fcef"},"headline":"PHP : Operator","datePublished":"2022-09-22T07:30:23+00:00","dateModified":"2023-05-11T06:28:22+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webhozz.com\/blog\/php-operator\/"},"wordCount":663,"publisher":{"@id":"https:\/\/www.webhozz.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.webhozz.com\/blog\/php-operator\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webhozz.com\/blog\/wp-content\/uploads\/2022\/09\/PHP_1.jpg","articleSection":["Belajar Web Programming"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.webhozz.com\/blog\/php-operator\/","url":"https:\/\/www.webhozz.com\/blog\/php-operator\/","name":"PHP : Operator - WebHozz Blog","isPartOf":{"@id":"https:\/\/www.webhozz.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webhozz.com\/blog\/php-operator\/#primaryimage"},"image":{"@id":"https:\/\/www.webhozz.com\/blog\/php-operator\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webhozz.com\/blog\/wp-content\/uploads\/2022\/09\/PHP_1.jpg","datePublished":"2022-09-22T07:30:23+00:00","dateModified":"2023-05-11T06:28:22+00:00","breadcrumb":{"@id":"https:\/\/www.webhozz.com\/blog\/php-operator\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webhozz.com\/blog\/php-operator\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webhozz.com\/blog\/php-operator\/#primaryimage","url":"https:\/\/www.webhozz.com\/blog\/wp-content\/uploads\/2022\/09\/PHP_1.jpg","contentUrl":"https:\/\/www.webhozz.com\/blog\/wp-content\/uploads\/2022\/09\/PHP_1.jpg","width":"750","height":"400"},{"@type":"BreadcrumbList","@id":"https:\/\/www.webhozz.com\/blog\/php-operator\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webhozz.com\/blog\/"},{"@type":"ListItem","position":2,"name":"PHP : Operator"}]},{"@type":"WebSite","@id":"https:\/\/www.webhozz.com\/blog\/#website","url":"https:\/\/www.webhozz.com\/blog\/","name":"WebHozz Blog","description":"Kursus Web &amp; Android di Jakarta Bandung","publisher":{"@id":"https:\/\/www.webhozz.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webhozz.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webhozz.com\/blog\/#organization","name":"WebHozz","url":"https:\/\/www.webhozz.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webhozz.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.webhozz.com\/blog\/wp-content\/uploads\/2018\/04\/logo-persegi.jpg","contentUrl":"https:\/\/www.webhozz.com\/blog\/wp-content\/uploads\/2018\/04\/logo-persegi.jpg","width":442,"height":442,"caption":"WebHozz"},"image":{"@id":"https:\/\/www.webhozz.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.webhozz.com\/blog\/#\/schema\/person\/d5f539ad171dc74baaf6a98dfef6fcef","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/bff35e4083f3870e2f911c4437e788147d340f274268d361dd7e1cf20bebb156?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/bff35e4083f3870e2f911c4437e788147d340f274268d361dd7e1cf20bebb156?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/bff35e4083f3870e2f911c4437e788147d340f274268d361dd7e1cf20bebb156?s=96&d=mm&r=g","caption":"admin"},"url":"https:\/\/www.webhozz.com\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webhozz.com\/blog\/wp-json\/wp\/v2\/posts\/11912","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webhozz.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webhozz.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webhozz.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webhozz.com\/blog\/wp-json\/wp\/v2\/comments?post=11912"}],"version-history":[{"count":2,"href":"https:\/\/www.webhozz.com\/blog\/wp-json\/wp\/v2\/posts\/11912\/revisions"}],"predecessor-version":[{"id":12721,"href":"https:\/\/www.webhozz.com\/blog\/wp-json\/wp\/v2\/posts\/11912\/revisions\/12721"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webhozz.com\/blog\/wp-json\/wp\/v2\/media\/11872"}],"wp:attachment":[{"href":"https:\/\/www.webhozz.com\/blog\/wp-json\/wp\/v2\/media?parent=11912"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webhozz.com\/blog\/wp-json\/wp\/v2\/categories?post=11912"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webhozz.com\/blog\/wp-json\/wp\/v2\/tags?post=11912"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}