File "EvalObjectFactoryUnitTest.inc"
Full Path: /home/warrior1/public_html/wp-content/themes/storefront/vendor/squizlabs/php_codesniffer/src/Standards/MySource/Tests/PHP/EvalObjectFactoryUnitTest.inc
File size: 394 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
function getWidget($type)
{
eval('$obj = new '.$type.'();');
return $obj;
}//end getWidget()
function getWidget2($type)
{
$string = '$obj = new '.$type.'();';
eval($string);
eval('$string = "";');
return $obj;
}//end getWidget2()
function getWidget3($type)
{
$string = '$obj = new ';
eval($string.$type.'();');
return $obj;
}//end getWidget3()
?>