1--TEST-- 2XSLTProcessor::$maxTemplateVars errors 3--EXTENSIONS-- 4xsl 5--INI-- 6error_reporting=E_ALL & ~E_DEPRECATED 7--FILE-- 8<?php 9 10$processor = new XSLTProcessor; 11$oldValue = $processor->maxTemplateVars; 12 13try { 14 $processor->maxTemplateVars = -1; 15} catch (ValueError $e) { 16 echo $e->getMessage(), "\n"; 17} 18 19var_dump($processor->maxTemplateVars === $oldValue); 20 21try { 22 $processor->maxTemplateVars = -32.1; 23} catch (ValueError $e) { 24 echo $e->getMessage(), "\n"; 25} 26 27var_dump($processor->maxTemplateVars === $oldValue); 28 29try { 30 $processor->maxTemplateVars = "-1"; 31} catch (ValueError $e) { 32 echo $e->getMessage(), "\n"; 33} 34 35var_dump($processor->maxTemplateVars === $oldValue); 36 37?> 38--EXPECT-- 39XSLTProcessor::$maxTemplateVars must be greater than or equal to 0 40bool(true) 41XSLTProcessor::$maxTemplateVars must be greater than or equal to 0 42bool(true) 43XSLTProcessor::$maxTemplateVars must be greater than or equal to 0 44bool(true) 45