{"id":293,"date":"2023-09-19T09:13:31","date_gmt":"2023-09-19T07:13:31","guid":{"rendered":"https:\/\/extendsclass.com\/blog\/?p=293"},"modified":"2023-09-19T08:47:17","modified_gmt":"2023-09-19T06:47:17","slug":"frankenphp-the-modern-php-app-server-written-in-go","status":"publish","type":"post","link":"https:\/\/extendsclass.com\/blog\/frankenphp-the-modern-php-app-server-written-in-go","title":{"rendered":"FrankenPHP: The Modern Php App Server, written in Go"},"content":{"rendered":"\n<p>Are you tired of juggling multiple PHP frameworks for different projects? Do you wish there was a way to combine the best features of your favorite frameworks into one cohesive and versatile tool?<\/p>\n\n\n\n<p>FrankenPHP is unfortunately not yet the ultimate solution, it is still tagged as <strong>very experimental<\/strong> \ud83d\ude41<\/p>\n\n\n\n<p>Fingers crossed that it will one day be usable in production; in the meantime, we can play with it.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_47_1 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"ez-toc-toggle-icon-1\"><label for=\"item-69f51ef19cdf6\" aria-label=\"Table of Content\"><span style=\"display: flex;align-items: center;width: 35px;height: 30px;justify-content: center;direction:ltr;\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/label><input  type=\"checkbox\" id=\"item-69f51ef19cdf6\"><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/extendsclass.com\/blog\/frankenphp-the-modern-php-app-server-written-in-go\/#What_is_FrankenPHP\" title=\"What is FrankenPHP?\">What is FrankenPHP?<\/a><ul class='ez-toc-list-level-3'><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/extendsclass.com\/blog\/frankenphp-the-modern-php-app-server-written-in-go\/#How_to_Get_Started_with_FrankenPHP\" title=\"How to Get Started with FrankenPHP\">How to Get Started with FrankenPHP<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/extendsclass.com\/blog\/frankenphp-the-modern-php-app-server-written-in-go\/#Conclusion\" title=\"Conclusion\">Conclusion<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_is_FrankenPHP\"><\/span>What is FrankenPHP?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>FrankenPHP is a modern application server for PHP built on top of the&nbsp;Caddy&nbsp;web server.<\/p>\n\n\n\n<p>Key features:<\/p>\n\n\n\n<ul>\n<li><strong>Early Hints<\/strong>: Using Early Hints can improve the load time of your web pages by 30%.<\/li>\n\n\n\n<li><strong>Worker mode: <\/strong>Boot your application once and keep it in memory. FrankenPHP will handle incoming requests in a few milliseconds.<\/li>\n\n\n\n<li><strong>Real-time capabilities<\/strong>:  FrankenPHP comes with a built-in Mercure hub! Mercure allows to push event in real-time to all the connected devices: they will receive instantly a JavaScript event.<\/li>\n\n\n\n<li><strong>Easy to Dockerize<\/strong><\/li>\n\n\n\n<li>Automatic HTTPS, HTTP\/2 and HTTP3<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_Get_Started_with_FrankenPHP\"><\/span>How to Get Started with FrankenPHP<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Getting started with FrankenPHP is easy;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker run -v $PWD:\/app\/public \\\n    -p 80:80 -p 443:443 \\\n    dunglas\/frankenphp<\/code><\/pre>\n\n\n\n<p>Go to&nbsp;<code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-medium-gray-color\">https:\/\/localhost<\/mark><\/code>, and enjoy!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>FrankenPHP is an exciting and unconventional approach to PHP web development, offering the best of multiple worlds in a single framework. While it&#8217;s still in its early stages, its potential to simplify the lives of PHP developers and streamline web development workflows is promising.<\/p>\n\n\n\n<p>Waiting to see if a stable and production usable version will be released soon (or not).<\/p>\n\n\n\n<p class=\"has-text-align-center\"><a href=\"https:\/\/github.com\/dunglas\/frankenphp#readme\" title=\"\"> Github:<\/a> <a href=\"https:\/\/github.com\/dunglas\/frankenphp#readme\" title=\"\">FrankenPhp<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Are you tired of juggling multiple PHP frameworks for different projects? Is FrankenPHP the ultimate framework?<\/p>\n","protected":false},"author":1,"featured_media":294,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_sitemap_exclude":false,"_sitemap_priority":"","_sitemap_frequency":""},"categories":[2],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/extendsclass.com\/blog\/wp-json\/wp\/v2\/posts\/293"}],"collection":[{"href":"https:\/\/extendsclass.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/extendsclass.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/extendsclass.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/extendsclass.com\/blog\/wp-json\/wp\/v2\/comments?post=293"}],"version-history":[{"count":3,"href":"https:\/\/extendsclass.com\/blog\/wp-json\/wp\/v2\/posts\/293\/revisions"}],"predecessor-version":[{"id":299,"href":"https:\/\/extendsclass.com\/blog\/wp-json\/wp\/v2\/posts\/293\/revisions\/299"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/extendsclass.com\/blog\/wp-json\/wp\/v2\/media\/294"}],"wp:attachment":[{"href":"https:\/\/extendsclass.com\/blog\/wp-json\/wp\/v2\/media?parent=293"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/extendsclass.com\/blog\/wp-json\/wp\/v2\/categories?post=293"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/extendsclass.com\/blog\/wp-json\/wp\/v2\/tags?post=293"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}