1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 19:23:22 +02:00
Files
archived-php-src/ext/standard/tests/general_functions/bug72306.phpt
T
Nikita Popov 902d64390e Deprecate implicit dynamic properties
Writing to a proprety that hasn't been declared is deprecated,
unless the class uses the #[AllowDynamicProperties] attribute or
defines __get()/__set().

RFC: https://wiki.php.net/rfc/deprecate_dynamic_properties
2021-11-26 14:10:11 +01:00

25 lines
505 B
PHP

--TEST--
Bug #72306 (Heap overflow through proc_open and $env parameter)
--FILE--
<?php
class moo {
public $a;
function __construct() { $this->a = 0; }
function __toString() { return $this->a++ ? str_repeat("a", 0x8000) : "a"; }
}
$env = array('some_option' => new moo());
$pipes = array();
$description = array(
0 => array("pipe", "r"),
1 => array("pipe", "w"),
2 => array("pipe", "r")
);
$process = proc_open('nothing', $description, $pipes, NULL, $env);
?>
okey
--EXPECT--
okey