PHP code example of g41797 / queue-sqs

1. Go to this page and download the library: Download g41797/queue-sqs library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

g41797 / queue-sqs example snippets


[
     'key' => null,                 // AWS credentials. If no credentials are provided, the SDK will attempt to load them from the environment.
     'secret' => null,              // AWS credentials. If no credentials are provided, the SDK will attempt to load them from the environment.
     'token' => null,               // AWS credentials. If no credentials are provided, the SDK will attempt to load them from the environment.
     'region' => us-east-1,         // (string,   // The AWS account ID of the account that created the queue.
]

[
    'key' => 'anyKey',
    'secret' => 'noSecrets',
]

// Push a job into the queue and get a message ID.
$id = $queue->push(new SomeJob());

// Get job status.
$status = $queue->status($id);
xml
    <php>
        <ini name="error_reporting" value="-1"/>
        <env name="ENDPOINT" value="http://localhost.localstack.cloud:4566" force="true" />
    </php>