Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
--TEST-- AMQPExchange --SKIPIF-- <?php if (!extension_loaded("amqp")) print "skip AMQP ext..
Decoded Output download
skip AMQP extension is not loaded
Did this file decode correctly?
Original Code
--TEST--
AMQPExchange
--SKIPIF--
<?php
if (!extension_loaded("amqp")) print "skip AMQP extension is not loaded";
elseif (!getenv("PHP_AMQP_HOST")) print "skip PHP_AMQP_HOST environment variable is not set";
?>
--FILE--
<?php
$cnn = new AMQPConnection();
$cnn->setHost(getenv('PHP_AMQP_HOST'));
$cnn->connect();
$ch = new AMQPChannel($cnn);
$ex = new AMQPExchange($ch);
$ex->setName("exchange-" . bin2hex(random_bytes(32)));
$ex->setType(AMQP_EX_TYPE_FANOUT);
$ex->declareExchange();
var_dump($ex->publish('message', 'routing.key'));
$ex->delete();
?>
--EXPECT--
NULL
Function Calls
extension_loaded | 1 |
Stats
MD5 | 6b1431b643d05188484240d9f0cee4b2 |
Eval Count | 0 |
Decode Time | 83 ms |