Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php print "--- Testing casts\n"; try { $im = new Imagick(); $im->newImage(100, 100, "..

Decoded Output download

<?php
print "--- Testing casts
";

try {
	$im = new Imagick();
	$im->newImage(100, 100, "red");
	$im->tintImage("red", "gray(50%)");
	echo "Casting color and opacity succeeded
";
} catch (Exception $e) {
	echo "Casting color and opacity failed: " , $e->getMessage() . PHP_EOL;
}

try {
	$im = new Imagick();
	$pixel = new ImagickPixel("red");
	$strengthPixel = new ImagickPixel("gray");
	$im->newImage(100, 100, $pixel);
	$im->tintImage($pixel, $strengthPixel);
	echo "Setting color and opacity without cast succeeded
";
} catch (Exception $e) {
	echo "Setting color and opacity without cast failed: " , $e->getMessage() . PHP_EOL;
}

?>

Did this file decode correctly?

Original Code

<?php
print "--- Testing casts\n";

try {
	$im = new Imagick();
	$im->newImage(100, 100, "red");
	$im->tintImage("red", "gray(50%)");
	echo "Casting color and opacity succeeded\n";
} catch (Exception $e) {
	echo "Casting color and opacity failed: " , $e->getMessage() . PHP_EOL;
}

try {
	$im = new Imagick();
	$pixel = new ImagickPixel("red");
	$strengthPixel = new ImagickPixel("gray");
	$im->newImage(100, 100, $pixel);
	$im->tintImage($pixel, $strengthPixel);
	echo "Setting color and opacity without cast succeeded\n";
} catch (Exception $e) {
	echo "Setting color and opacity without cast failed: " , $e->getMessage() . PHP_EOL;
}

?>

Function Calls

None

Variables

None

Stats

MD5 44d1185040941c56e18b804398ba7a38
Eval Count 0
Decode Time 121 ms