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-- No overflow should occur during the memory_limit check for wordwrap() --SKIPIF-- ..

Decoded Output download

--TEST--
No overflow should occur during the memory_limit check for wordwrap()
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) != 'WIN' || PHP_INT_SIZE != 4) die("skip this test is for 32bit Windows platforms only");
if (getenv("USE_ZEND_ALLOC") === "0") die("skip Zend MM disabled");
?>
--INI--
memory_limit=128M
--FILE--
<?php

$str = str_repeat('x', 65534);
$str2 = str_repeat('x', 65535);
wordwrap($str, 1, $str2);

?>
--EXPECTF--
Fatal error: Possible integer overflow in memory allocation (4294901777 + %d) in %s on line %d

Did this file decode correctly?

Original Code

--TEST--
No overflow should occur during the memory_limit check for wordwrap()
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) != 'WIN' || PHP_INT_SIZE != 4) die("skip this test is for 32bit Windows platforms only");
if (getenv("USE_ZEND_ALLOC") === "0") die("skip Zend MM disabled");
?>
--INI--
memory_limit=128M
--FILE--
<?php

$str = str_repeat('x', 65534);
$str2 = str_repeat('x', 65535);
wordwrap($str, 1, $str2);

?>
--EXPECTF--
Fatal error: Possible integer overflow in memory allocation (4294901777 + %d) in %s on line %d

Function Calls

None

Variables

None

Stats

MD5 8ef0fb9c1b8f598966e828a5ad7a272b
Eval Count 0
Decode Time 81 ms