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 Imagick, cropImage --SKIPIF-- <?php $imageMagickRequiredVersion=0x675; requi..

Decoded Output download

--TEST--
Test Imagick, cropImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$startX = 50;
$startY = 50;
$width = 50;
$height = 50;

function cropImage($startX, $startY, $width, $height) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->cropImage($width, $height, $startX, $startY);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

cropImage($startX, $startY, $width, $height) ;
echo "Ok";
?>
--EXPECTF--
Ok

Did this file decode correctly?

Original Code

--TEST--
Test Imagick, cropImage
--SKIPIF--
<?php
$imageMagickRequiredVersion=0x675;
require_once(dirname(__FILE__) . '/skipif.inc');
?>
--FILE--
<?php

$startX = 50;
$startY = 50;
$width = 50;
$height = 50;

function cropImage($startX, $startY, $width, $height) {
    $imagick = new \Imagick();
    $imagick->newPseudoImage(640, 480, "magick:logo");
    $imagick->cropImage($width, $height, $startX, $startY);
    $bytes = $imagick->getImageBlob();
    if (strlen($bytes) <= 0) { echo "Failed to generate image.";} 
}

cropImage($startX, $startY, $width, $height) ;
echo "Ok";
?>
--EXPECTF--
Ok

Function Calls

dirname 1

Variables

$imageMagickRequiredVersion 1653

Stats

MD5 de598471d0944fd21df9c7ec7b207b90
Eval Count 0
Decode Time 85 ms