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 fprintf() function (variation - 4) --FILE-- <?php $char_variation = array( ..

Decoded Output download

--TEST--
Test fprintf() function (variation - 4)
--FILE--
<?php

$char_variation = array( 'a', "a", 67, -67, 99 );

/* creating dumping file */
$data_file = __DIR__ . '/fprintf_variation_004.txt';
if (!($fp = fopen($data_file, 'wt')))
   return;

/* char type variations */
fprintf($fp, "
*** Testing fprintf() for chars ***
");
foreach( $char_variation as $char ) {
  fprintf( $fp, "
");
  fprintf( $fp,"%c", $char );
}

fclose($fp);

print_r(file_get_contents($data_file));
echo "
Done";

unlink($data_file);

?>
--EXPECTF--
*** Testing fprintf() for chars ***

%0
%0
C
%s
c
Done

Did this file decode correctly?

Original Code

--TEST--
Test fprintf() function (variation - 4)
--FILE--
<?php

$char_variation = array( 'a', "a", 67, -67, 99 );

/* creating dumping file */
$data_file = __DIR__ . '/fprintf_variation_004.txt';
if (!($fp = fopen($data_file, 'wt')))
   return;

/* char type variations */
fprintf($fp, "\n*** Testing fprintf() for chars ***\n");
foreach( $char_variation as $char ) {
  fprintf( $fp, "\n");
  fprintf( $fp,"%c", $char );
}

fclose($fp);

print_r(file_get_contents($data_file));
echo "\nDone";

unlink($data_file);

?>
--EXPECTF--
*** Testing fprintf() for chars ***

%0
%0
C
%s
c
Done

Function Calls

None

Variables

$char_variation [{'key': 0, 'value': 'a'}, {'key': 1, 'value': 'a'}, {'key': 2, 'value': 67}, {'key': 3, 'value': -67}, {'key': 4, 'value': 99}]

Stats

MD5 e99c85a62918ba41fb30ff09f1e9ad64
Eval Count 0
Decode Time 99 ms