Created
June 5, 2017 13:27
-
-
Save develth/0fd7940abbce2efdbc45202d3b9bd263 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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