{"id":72250,"date":"2024-07-01T21:00:07","date_gmt":"2024-07-01T13:00:07","guid":{"rendered":"https:\/\/www.hongkiat.com\/blog\/?p=72250"},"modified":"2024-06-30T21:30:16","modified_gmt":"2024-06-30T13:30:16","slug":"frameworkx","status":"publish","type":"post","link":"https:\/\/www.hongkiat.com\/blog\/frameworkx\/","title":{"rendered":"Introduction to FrameworkX"},"content":{"rendered":"<p>PHP has come a long way and continues to improve with new features, syntax, and speed. The ecosystem is also expanding, with many developers creating frameworks to simplify the lives of other developers. Popular, full-featured frameworks like Laravel and Symfony exist, as do lightweight microframeworks like <strong><a rel=\"noopener\" target=\"_blank\" href=\"https:\/\/framework-x.org\/\">FrameworkX<\/a><\/strong>.<\/p>\n<p>It is a lightweight microframework for PHP that uses an event-driven, non-blocking architecture, similar to Node.js which is perfect for high-concurrency and real-time applications like chat apps or live notifications.<\/p>\n<p>In this article, we will explore what FrameworkX is and how it differs from traditional PHP frameworks. Let\u2019s get started!<\/p>\n<h2>Getting Started<\/h2>\n<p>First, make sure you have PHP and <a rel=\"noopener\" target=\"_blank\" href=\"https:\/\/getcomposer.org\/\">Composer<\/a> set up on your computer. Once installed, you can add <strong>FrameworkX<\/strong> to your project with this command:<\/p>\n<pre>\r\ncomposer require clue\/framework-x\r\n<\/pre>\n<p><strong>FrameworkX<\/strong> doesn\u2019t require a complex setup. All you need is a <strong>public\/index.php<\/strong> file. Here\u2019s a basic example to display \u201cHello World!\u201d on the homepage:<\/p>\n<pre>\r\n&lt;?php\r\nrequire dirname(__DIR__) . '\/vendor\/autoload.php';\r\n$app = new FrameworkX\\App();\r\n$app->get('\/', fn () => \\React\\Http\\Message\\Response::plaintext(\"Hello world!\\n\"));\r\n$app->run();\r\n<\/pre>\n<p>To run your application, type:<\/p>\n<pre>\r\nphp public\/index.php\r\n<\/pre>\n<p>This command starts a local server using PHP\u2019s built-in server, backed by the <a rel=\"noopener\" target=\"_blank\" href=\"https:\/\/reactphp.org\/socket\/\">ReactPHP Socket<\/a> component. No need for Nginx or Apache. Your server will run at <code>http:\/\/127.0.0.1:8080<\/code>, and it should display \u201cHello World!\u201d.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/frameworkx\/localhost-framework-x.jpg\" alt=\"Localhost server setup\" width=\"700\" height=\"200\"><\/figure>\n<p>Besides plain text, you can also return JSON data. For example:<\/p>\n<pre>\r\n&lt;?php\r\nrequire dirname(__DIR__) . '\/vendor\/autoload.php';\r\n$users = [['name' => 'Jon Doe'], ['name' => 'Jane Doe']];\r\n\r\n$app = new FrameworkX\\App();\r\n$app->get('\/', fn () => \\React\\Http\\Message\\Response::json($users));\r\n$app->run();\r\n<\/pre>\n<h2>Async Operations<\/h2>\n<p>PHP operations are usually blocking and synchronous, meaning each task must finish before the next one starts. <strong>FrameworkX<\/strong> is built on the <a rel=\"noopener\" target=\"_blank\" href=\"https:\/\/reactphp.org\/\">ReactPHP library<\/a>.<\/p>\n<p>ReactPHP is a library that provides components such as the <a rel=\"noopener\" target=\"_blank\" href=\"https:\/\/reactphp.org\/event-loop\/\">EventLoop<\/a>, <a rel=\"noopener\" target=\"_blank\" href=\"https:\/\/reactphp.org\/stream\/\">Stream<\/a>, <a rel=\"noopener\" target=\"_blank\" href=\"https:\/\/reactphp.org\/promise\/\">Promise<\/a>, <a rel=\"noopener\" target=\"_blank\" href=\"https:\/\/reactphp.org\/async\/\">Async<\/a>, and <a rel=\"noopener\" target=\"_blank\" href=\"https:\/\/reactphp.org\/http\/\">HTTP<\/a> components, which enable asynchronous operations. Thus, tasks can run concurrently without waiting for others to finish. This is ideal for handling multiple connections, HTTP requests, or I\/O operations simultaneously.<\/p>\n<p>In this example, we\u2019ve updated our <strong>index.php<\/strong> to fetch an API. Instead of using the <code>curl_*<\/code> functions, we will use the <a rel=\"noopener\" target=\"_blank\" href=\"https:\/\/reactphp.org\/http\/\">HTTP component<\/a> to make an asynchronous request.<\/p>\n<pre>\r\n$app = new FrameworkX\\App();\r\n$app->get('\/', function () {\r\n    echo \"Start\\n\";\r\n    (new \\React\\Http\\Browser())\r\n        ->get('https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts')\r\n        ->then(function () {\r\n            echo \"End (API)\\n\";\r\n        });\r\n    echo \"End\\n\";\r\n\r\n    return \\React\\Http\\Message\\Response::plaintext(\"Hello world!\\n\");\r\n});\r\n$app->run();\r\n<\/pre>\n<p>Normally, an external API request would block the page from rendering until the request completes. However, with the asynchronous operations that the ReactPHP HTTP component handles, the page loads instantly, as evidenced by the log.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/frameworkx\/async-operations.jpg\" alt=\"Async operations log\" width=\"700\" height=\"260\"><\/figure>\n<p>This makes FrameworkX capable of handling many more concurrent requests than traditional PHP setups, significantly speeding up page load times. But how fast is it?<\/p>\n<h2>Speed<\/h2>\n<p>I tested <strong>FrameworkX<\/strong> on a basic, inexpensive DigitalOcean droplet with 1 vCPU and 1GB of RAM. It handled around 4,000 requests per second effortlessly.<\/p>\n<pre>\r\nConcurrency Level:      50\r\nTime taken for tests:   22.636 seconds\r\nComplete requests:      100000\r\nFailed requests:        0\r\nKeep-Alive requests:    100000\r\nTotal transferred:      17400000 bytes\r\nHTML transferred:       1300000 bytes\r\nRequests per second:    4417.69 [#\/sec] (mean)\r\nTime per request:       11.318 [ms] (mean)\r\nTime per request:       0.226 [ms] (mean, across all concurrent requests)\r\nTransfer rate:          750.66 [Kbytes\/sec] received\r\n<\/pre>\n<p>Even with additional workload, like disk read operations and rendering 100 lists from a JSON file, it still managed around 2700 requests per second.<\/p>\n<pre>\r\nConcurrency Level:      50\r\nTime taken for tests:   36.381 seconds\r\nComplete requests:      100000\r\nFailed requests:        0\r\nKeep-Alive requests:    100000\r\nTotal transferred:      296700000 bytes\r\nHTML transferred:       280500000 bytes\r\nRequests per second:    2748.72 [#\/sec] (mean)\r\nTime per request:       18.190 [ms] (mean)\r\nTime per request:       0.364 [ms] (mean, across all concurrent requests)\r\nTransfer rate:          7964.31 [Kbytes\/sec] received\r\n<\/pre>\n<p>I\u2019m pretty sure it could be much faster with better server specifications.<\/p>\n<h2>Wrapping Up<\/h2>\n<p><strong>FrameworkX<\/strong> is a powerful, lightweight microframework for PHP. It runs asynchronously and is capable of handling multiple tasks efficiently, similar to Node.js. It\u2019s the perfect framework whether you\u2019re building a simple app or complex high-concurrency or real-time applications.<\/p>","protected":false},"excerpt":{"rendered":"<p>PHP has come a long way and continues to improve with new features, syntax, and speed. The ecosystem is also expanding, with many developers creating frameworks to simplify the lives of other developers. Popular, full-featured frameworks like Laravel and Symfony exist, as do lightweight microframeworks like FrameworkX. It is a lightweight microframework for PHP that&hellip;<\/p>\n","protected":false},"author":113,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3392],"tags":[],"topic":[],"class_list":["entry-content","is-maxi"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.8 (Yoast SEO v27.6) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Introduction to FrameworkX - Hongkiat<\/title>\n<meta name=\"description\" content=\"PHP has come a long way and continues to improve with new features, syntax, and speed. The ecosystem is also expanding, with many developers creating\" \/>\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.hongkiat.com\/blog\/frameworkx\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Introduction to FrameworkX\" \/>\n<meta property=\"og:description\" content=\"PHP has come a long way and continues to improve with new features, syntax, and speed. The ecosystem is also expanding, with many developers creating\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hongkiat.com\/blog\/frameworkx\/\" \/>\n<meta property=\"og:site_name\" content=\"Hongkiat\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hongkiatcom\" \/>\n<meta property=\"article:published_time\" content=\"2024-07-01T13:00:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/assets.hongkiat.com\/uploads\/frameworkx\/localhost-framework-x.jpg\" \/>\n<meta name=\"author\" content=\"Thoriq Firdaus\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@tfirdaus\" \/>\n<meta name=\"twitter:site\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Thoriq Firdaus\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/frameworkx\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/frameworkx\\\/\"},\"author\":{\"name\":\"Thoriq Firdaus\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/e7948c7a175d211496331e4b6ce55807\"},\"headline\":\"Introduction to FrameworkX\",\"datePublished\":\"2024-07-01T13:00:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/frameworkx\\\/\"},\"wordCount\":469,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/frameworkx\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/frameworkx\\\/localhost-framework-x.jpg\",\"articleSection\":[\"Coding\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/frameworkx\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/frameworkx\\\/\",\"name\":\"Introduction to FrameworkX - Hongkiat\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/frameworkx\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/frameworkx\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/frameworkx\\\/localhost-framework-x.jpg\",\"datePublished\":\"2024-07-01T13:00:07+00:00\",\"description\":\"PHP has come a long way and continues to improve with new features, syntax, and speed. The ecosystem is also expanding, with many developers creating\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/frameworkx\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/frameworkx\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/frameworkx\\\/#primaryimage\",\"url\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/frameworkx\\\/localhost-framework-x.jpg\",\"contentUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/frameworkx\\\/localhost-framework-x.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/frameworkx\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Introduction to FrameworkX\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"name\":\"Hongkiat\",\"description\":\"Tech and Design Tips\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\",\"name\":\"Hongkiat.com\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"contentUrl\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"width\":1200,\"height\":799,\"caption\":\"Hongkiat.com\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/hongkiatcom\",\"https:\\\/\\\/x.com\\\/hongkiat\",\"https:\\\/\\\/www.pinterest.com\\\/hongkiat\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/e7948c7a175d211496331e4b6ce55807\",\"name\":\"Thoriq Firdaus\",\"description\":\"Thoriq is a writer for Hongkiat.com with a passion for web design and development. He is the author of Responsive Web Design by Examples, where he covered his best approaches in developing responsive websites quickly with a framework.\",\"sameAs\":[\"https:\\\/\\\/thoriq.com\",\"https:\\\/\\\/x.com\\\/tfirdaus\"],\"jobTitle\":\"Web Developer\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/author\\\/thoriq\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Introduction to FrameworkX - Hongkiat","description":"PHP has come a long way and continues to improve with new features, syntax, and speed. The ecosystem is also expanding, with many developers creating","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.hongkiat.com\/blog\/frameworkx\/","og_locale":"en_US","og_type":"article","og_title":"Introduction to FrameworkX","og_description":"PHP has come a long way and continues to improve with new features, syntax, and speed. The ecosystem is also expanding, with many developers creating","og_url":"https:\/\/www.hongkiat.com\/blog\/frameworkx\/","og_site_name":"Hongkiat","article_publisher":"https:\/\/www.facebook.com\/hongkiatcom","article_published_time":"2024-07-01T13:00:07+00:00","og_image":[{"url":"https:\/\/assets.hongkiat.com\/uploads\/frameworkx\/localhost-framework-x.jpg","type":"","width":"","height":""}],"author":"Thoriq Firdaus","twitter_card":"summary_large_image","twitter_creator":"@tfirdaus","twitter_site":"@hongkiat","twitter_misc":{"Written by":"Thoriq Firdaus","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hongkiat.com\/blog\/frameworkx\/#article","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/frameworkx\/"},"author":{"name":"Thoriq Firdaus","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/e7948c7a175d211496331e4b6ce55807"},"headline":"Introduction to FrameworkX","datePublished":"2024-07-01T13:00:07+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/frameworkx\/"},"wordCount":469,"publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/frameworkx\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/frameworkx\/localhost-framework-x.jpg","articleSection":["Coding"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.hongkiat.com\/blog\/frameworkx\/","url":"https:\/\/www.hongkiat.com\/blog\/frameworkx\/","name":"Introduction to FrameworkX - Hongkiat","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/frameworkx\/#primaryimage"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/frameworkx\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/frameworkx\/localhost-framework-x.jpg","datePublished":"2024-07-01T13:00:07+00:00","description":"PHP has come a long way and continues to improve with new features, syntax, and speed. The ecosystem is also expanding, with many developers creating","breadcrumb":{"@id":"https:\/\/www.hongkiat.com\/blog\/frameworkx\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hongkiat.com\/blog\/frameworkx\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/frameworkx\/#primaryimage","url":"https:\/\/assets.hongkiat.com\/uploads\/frameworkx\/localhost-framework-x.jpg","contentUrl":"https:\/\/assets.hongkiat.com\/uploads\/frameworkx\/localhost-framework-x.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.hongkiat.com\/blog\/frameworkx\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hongkiat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Introduction to FrameworkX"}]},{"@type":"WebSite","@id":"https:\/\/www.hongkiat.com\/blog\/#website","url":"https:\/\/www.hongkiat.com\/blog\/","name":"Hongkiat","description":"Tech and Design Tips","publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hongkiat.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.hongkiat.com\/blog\/#organization","name":"Hongkiat.com","url":"https:\/\/www.hongkiat.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","contentUrl":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","width":1200,"height":799,"caption":"Hongkiat.com"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/hongkiatcom","https:\/\/x.com\/hongkiat","https:\/\/www.pinterest.com\/hongkiat\/"]},{"@type":"Person","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/e7948c7a175d211496331e4b6ce55807","name":"Thoriq Firdaus","description":"Thoriq is a writer for Hongkiat.com with a passion for web design and development. He is the author of Responsive Web Design by Examples, where he covered his best approaches in developing responsive websites quickly with a framework.","sameAs":["https:\/\/thoriq.com","https:\/\/x.com\/tfirdaus"],"jobTitle":"Web Developer","url":"https:\/\/www.hongkiat.com\/blog\/author\/thoriq\/"}]}},"jetpack_featured_media_url":"https:\/\/","jetpack_shortlink":"https:\/\/wp.me\/p4uxU-iNk","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/72250","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/users\/113"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/comments?post=72250"}],"version-history":[{"count":2,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/72250\/revisions"}],"predecessor-version":[{"id":72252,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/72250\/revisions\/72252"}],"wp:attachment":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/media?parent=72250"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/categories?post=72250"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/tags?post=72250"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/topic?post=72250"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}