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-- Check for eio_unlink function basic behaviour --FILE-- <?php $temp_filename = "e..

Decoded Output download

--TEST--
Check for eio_unlink function basic behaviour
--FILE--
<?php 
$temp_filename = "eio-temp.tmp";

$fp = fopen($temp_filename, "w");
fwrite($fp, "a");
fclose($fp);

function my_unlink_callback($data, $result) {
	global $temp_filename;

	if ($result == 0 && !file_exists($temp_filename)) {
		echo "eio_unlink";
	} 		
	@unlink($temp_filename);	
}



eio_unlink($temp_filename, EIO_PRI_DEFAULT, "my_unlink_callback");
eio_event_loop();
?>
--CLEAN--
<?php
?>
--EXPECT--
eio_unlink

Did this file decode correctly?

Original Code

--TEST--
Check for eio_unlink function basic behaviour
--FILE--
<?php 
$temp_filename = "eio-temp.tmp";

$fp = fopen($temp_filename, "w");
fwrite($fp, "a");
fclose($fp);

function my_unlink_callback($data, $result) {
	global $temp_filename;

	if ($result == 0 && !file_exists($temp_filename)) {
		echo "eio_unlink";
	} 		
	@unlink($temp_filename);	
}



eio_unlink($temp_filename, EIO_PRI_DEFAULT, "my_unlink_callback");
eio_event_loop();
?>
--CLEAN--
<?php
?>
--EXPECT--
eio_unlink

Function Calls

fopen 1
fwrite 1

Variables

$fp True
$temp_filename eio-temp.tmp

Stats

MD5 76e9dac8eb0b7e7f4f95fef61d721f32
Eval Count 0
Decode Time 503 ms