<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="208875" data-post-id="208875">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Exadra37" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Exadra37/120/9183_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Exadra37
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="hauleth" data-post="41" data-topic="38545">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/hauleth/48/18942_2.png" class="avatar"> hauleth:</div>
<blockquote>
<p>If you mean Zeal</p>
</blockquote>
</aside>
<p>Not ware of Zeal. What I have tried in the past on Linux was indeed Dash or am I getting confused <img src="https://forum.elixirforum.com/images/emoji/apple/thinking.png?v=15" title=":thinking:" class="emoji" alt=":thinking:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="208875" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/any-tips-on-coming-from-php/38545/42">Post #41</a>
	                </div>
	            </div>
              <div id="likers-container-208875" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="208875"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #41"></div>
  </section>
</div>
    <div class="postbit" id="208876" data-post-id="208876">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="kokolegorille" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/kokolegorille/120/4784_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  kokolegorille
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Now it seems for Mac only. From the link above <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="208876" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/any-tips-on-coming-from-php/38545/43">Post #42</a>
	                </div>
	            </div>
              <div id="likers-container-208876" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="208876"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #42"></div>
  </section>
</div>
    <div class="postbit" id="208999" data-post-id="208999">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="eteeselink" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/eteeselink/120/5160_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  eteeselink
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I’m late to the party, but I just want to add that when you look at PHP and Elixir from a distance and squint your eyes, there’s a lot of similarities in the execution model. People like to point and laugh at PHP but in many ways it’s just Phoenix/Plug done 20 years earlier.</p>
<p>Notably, PHP is stateless between requests (except if you use it in uncommon ways, eg ReactPHP). Every HTTP request starts a PHP thread, runs your code, returns a response, and exits. Every PHP request cycle is isolated, if you want to keep state to use between requests, you need to put it elsewhere (eg a database, some text files, a caching lib, somewhere).</p>
<p>Per the <a href="https://clojure.org/reference/transients" rel="noopener nofollow ugc">Rich Hickey definition of immutability</a>, you could say that PHP is a purely functional programming language on the HTTP level, ie it uses only the data in an HTTP request to produce a response. Sure, you can mutate variables. But that’s all local, internal, isolated. There’s no state, except in external services.</p>
<p>Now, this is <em>totally the same</em> as what Phoenix does with HTTP requests, except not in a thread but in a lighter-weight Erlang process. The biggest difference you’ll notice is that it’s easier to store some state <em>in</em> the same BEAM application (but, like with PHP, not in the request process).</p>
<p>Eg where in PHP you might need to store data in a database or in a session, in Elixir you can spin up your own, self-programmed processes to keep track of state that you can use between various requests, or to kick off some background processing. These are the GenServers and friends that Elixir people love to rave about. In other words, Elixir lets you do everything PHP would let you do (except for loops and <code>extract $$var</code>), but it <em>also</em> lets you keep state right inside your application and run stuff in the background.</p>
<p>Often you won’t need to do that. Eg for typical CRUD apps, you’ll follow a pattern that resembles PHP extremely much. Get a request (phoenix / php will spin up a process / thread), do some DB requests, produce a response (phoenix / php will kill the process / thread). And if you want, you can do all kinds of background processing, caching (eg with ETS or Cachex), realtime websocket-y stuff as well. But even then, your HTTP request handling will not deviate from what you’re used to in PHP. Only <em>all the other stuff</em> is different. You might not need any of that other stuff when you begin.</p>
<p>So Elixir is really just PHP with more curlies, fewer dollar signs and semicolons, a little bit less locally mutable state and a little bit more globally mutable state.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="208999" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/any-tips-on-coming-from-php/38545/44">Post #43</a>
	                </div>
	            </div>
              <div id="likers-container-208999" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="208999"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #43"></div>
  </section>
</div>
    <div class="postbit" id="209027" data-post-id="209027">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="eksperimental" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/eksperimental/120/1401_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  eksperimental
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>And there is a PHP implementation in Erlang,<br>
<a href="https://github.com/bragful/ephp" class="onebox" target="_blank" rel="noopener nofollow ugc">https://github.com/bragful/ephp</a></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="209027" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/any-tips-on-coming-from-php/38545/45">Post #44</a>
	                </div>
	            </div>
              <div id="likers-container-209027" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="209027"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>