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 imagecolorstotal() function : basic functionality --EXTENSIONS-- gd --SKIPIF..

Decoded Output download

*** Testing imagecolorstotal() : basic functionality ***

Did this file decode correctly?

Original Code

--TEST--
Test imagecolorstotal() function : basic functionality
--EXTENSIONS--
gd
--SKIPIF--
<?php
if(!function_exists('imagecolorstotal') || !function_exists('imagecreatefromgif')) {
    die('skip imagecolorstotal and imagecreatefromgif functions not available in this build');
}
?>
--FILE--
<?php
echo "*** Testing imagecolorstotal() : basic functionality ***\n";

// Get an image
$gif = __DIR__."/php.gif";
$im = imagecreatefromgif($gif);

echo 'Total colors in image: ' . imagecolorstotal($im);

// Free image
imagedestroy($im);
?>
--EXPECT--
*** Testing imagecolorstotal() : basic functionality ***
Total colors in image: 128

Function Calls

function_exists 2

Variables

None

Stats

MD5 312b3aaa8b3f8e5939f6f4f1d7203899
Eval Count 0
Decode Time 189 ms