1--TEST-- 2Bug #40236 (php -a function allocation eats memory) 3--SKIPIF-- 4<?php 5if (php_sapi_name() != "cli") die("skip CLI only"); 6if (extension_loaded("readline")) die("skip Test doesn't support readline"); 7?> 8--FILE-- 9<?php 10$php = getenv('TEST_PHP_EXECUTABLE'); 11$cmd = "\"$php\" -n -d memory_limit=4M -a \"".__DIR__."\"/bug40236.inc"; 12echo `$cmd`; 13?> 14--EXPECTF-- 15Interactive %s 16 17ok 18