PHP 5 has reached end of support and will be
deprecated
on January 31, 2026. After deprecation, you won't be able to deploy PHP 5
applications, even if your organization previously used an organization policy to
re-enable deployments of legacy runtimes. Your existing PHP
5 applications will continue to run and receive traffic after their
deprecation date. We recommend that
you migrate to the latest supported version of PHP.
Stay organized with collections
Save and categorize content based on your preferences.
The following code creates a task that will be sent as a POST request to the /worker handler of the application. The task contains name and action data, and will be processed by the default queue:
You can also add tasks in bulk to a queue using PushQueue. In the following example, two PushTask objects are added to a PushQueue using the addTasks() method.
$task1 = new PushTask('/someUrl');$task2 = new PushTask('/someOtherUrl');$queue = new PushQueue();$queue->addTasks([$task1, $task2]);
When you use PushTask and PushQueue, include these statements at the top of your PHP file:
use google\appengine\api\taskqueue\PushTask;use google\appengine\api\taskqueue\PushQueue;
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-21 UTC."],[[["\u003cp\u003eThis page provides instructions on using legacy bundled services and APIs, specifically within the first-generation runtimes of the App Engine standard environment.\u003c/p\u003e\n"],["\u003cp\u003eA task can be created and sent as a POST request to a designated handler using the \u003ccode\u003ePushTask\u003c/code\u003e class, including the name and action parameters that will be processed by the default queue.\u003c/p\u003e\n"],["\u003cp\u003eMultiple tasks can be added in bulk to a queue by creating \u003ccode\u003ePushTask\u003c/code\u003e objects and using the \u003ccode\u003eaddTasks()\u003c/code\u003e method within the \u003ccode\u003ePushQueue\u003c/code\u003e class.\u003c/p\u003e\n"],["\u003cp\u003eTo utilize the \u003ccode\u003ePushTask\u003c/code\u003e and \u003ccode\u003ePushQueue\u003c/code\u003e classes, you must include specific \u003ccode\u003euse\u003c/code\u003e statements at the beginning of your PHP file.\u003c/p\u003e\n"]]],[],null,[]]