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-- Test ImagickPixel, setColor --SKIPIF-- <?php require_once(dirname(__FILE__) . '/s..
Decoded Output download
--TEST--
Test ImagickPixel, setColor
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('ImagickPixel', array('setColorFromPixel'));
?>
--FILE--
<?php
$backgroundColor = new \ImagickPixel('green');
$red = new \ImagickPixel('red');
$backgroundColor->setColorFromPixel($red);
$expected = array(
"r" => 255,
"g" => 0,
"b" => 0,
"a" => 1
);
$actualColor = $backgroundColor->getColor();
if ($actualColor != $expected) {
echo "Not as expected :
";
var_dump($actualColor);
}
echo "Ok";
?>
--EXPECTF--
Ok
Did this file decode correctly?
Original Code
--TEST--
Test ImagickPixel, setColor
--SKIPIF--
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
checkClassMethods('ImagickPixel', array('setColorFromPixel'));
?>
--FILE--
<?php
$backgroundColor = new \ImagickPixel('green');
$red = new \ImagickPixel('red');
$backgroundColor->setColorFromPixel($red);
$expected = array(
"r" => 255,
"g" => 0,
"b" => 0,
"a" => 1
);
$actualColor = $backgroundColor->getColor();
if ($actualColor != $expected) {
echo "Not as expected :\n";
var_dump($actualColor);
}
echo "Ok";
?>
--EXPECTF--
Ok
Function Calls
dirname | 1 |
Stats
MD5 | e821dea9fe72d12d394a73976bbb353f |
Eval Count | 0 |
Decode Time | 83 ms |