- assert: documentation ( source)
<?php
function test_assert($string, $arguments = array()) {
// Make sure we don't pass in an empty string.
assert('$string !== \'\' && (empty($arguments) || strtr($string, $arguments) !== \'\')');
// Make sure we don't translate unnecessarily.
assert('empty($arguments) || strtr($string, $arguments) != implode($arguments)');
}
test_assert('@test f', ['@test' => 'test']);