<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Queue on seth-shi</title><link>https://sethix.com/tags/queue/</link><description>Recent content in Queue on seth-shi</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Tue, 06 Jul 2021 12:43:13 +0800</lastBuildDate><atom:link href="https://sethix.com/tags/queue/index.xml" rel="self" type="application/rss+xml"/><item><title>A Bug Caused by Static Variables in Laravel Queues</title><link>https://sethix.com/posts/2021070612/</link><pubDate>Tue, 06 Jul 2021 12:43:13 +0800</pubDate><guid>https://sethix.com/posts/2021070612/</guid><description>Environment PHP_VERSION=7.4 laravel/framework: ^7.0 Static Variables In many programming languages, static variables are defined as variables that: Have the same lifecycle as the program Are initialized only once However, in PHP&amp;rsquo;s common runtime environment (php-fpm mode), processes get recycled after each request, so static variables don&amp;rsquo;t persist in memory (only effective during the current request) Official PHP documentation states: &amp;ldquo;Another important feature of variable scoping is the static variable. A static variable exists only in a local function scope, but it does not lose its value when program execution leaves this scope.</description></item></channel></rss>