|
|
<?php
use Illuminate\Support\Facades\Route;
Route::get('/lab', function () { $message_delivery = [ 1, 2, ];
$message_mandatory = [ 1, 0, ];
$exchange_durable = [ 1, 0, ];
$exchange_type = [ 'direct', 'fanout', 'topic', 'headers', ];
$consumer_prefetch = [ 1, 2, ];
$consumer_ack = [ 1, 0, ];
$queue_durable = [ 1, 0, ];
$r = []; foreach ($message_delivery as $message_delivery_value) { foreach ($message_mandatory as $message_mandatory_value) { foreach ($exchange_durable as $exchange_durable_value) { foreach ($exchange_type as $exchange_type_value) { foreach ($consumer_prefetch as $consumer_prefetch_value) { foreach ($consumer_ack as $consumer_ack_value) { foreach ($queue_durable as $queue_durable_value) { $r[] = [ 'message_delivery_value' => $message_delivery_value, 'message_mandatory_value' => $message_mandatory_value, 'exchange_durable_value' => $exchange_durable_value, 'exchange_type_value' => $exchange_type_value, 'consumer_prefetch_value' => $consumer_prefetch_value, 'consumer_ack_value' => $consumer_ack_value, 'queue_durable_value' => $queue_durable_value, ]; } } } } } } }
$fp = fopen('states.csv', 'w');
$h = [ 'message_delivery_value', 'message_mandatory_value', 'exchange_durable_value', 'exchange_type_value', 'consumer_prefetch_value', 'consumer_ack_value', 'queue_durable_value', ];
fputcsv($fp, $h); foreach ($r as $fields) { fputcsv($fp, $fields); }
fclose($fp); });
|