Skip to content

Instantly share code, notes, and snippets.

@develth
Created June 5, 2017 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save develth/0fd7940abbce2efdbc45202d3b9bd263 to your computer and use it in GitHub Desktop.
Save develth/0fd7940abbce2efdbc45202d3b9bd263 to your computer and use it in GitHub Desktop.
<?php
class test{
protected $envi = null;
function setEnvironment($environment)
{
$this->envi = environment;
if ($this->envi) {
@trigger_error(sprintf('The "%s()" method is deprecated since version 3.3 and will be removed in 4.0. Pass the Twig Environment as second argument of the constructor instead.', __METHOD__), E_USER_DEPRECATED);
echo "trigger error" ;
}
echo " go on" ;
}
}
$test = new test();
$test->setEnvironment("my-test-env");
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment