trigger_error

Supported Versions: PHP 4 >= 4.0.1, PHP 5, PHP 7, PHP 8
Generates a user-level error/warning/notice message
Alias user_error
<?php trigger_error(string $message, int $error_level = E_USER_NOTICE): true
<?php             $className = substr($className, 2);

        }



        trigger_error(sprintf('Undefined property %s::$%s', $className, $property), E_USER_WARNING);



        return null;

    }
<?php <?php



test('notice', function () {

    trigger_error('This is a notice description', E_USER_NOTICE);



    expect(true)->toBeTrue();

});
<?php describe('a "describe" group of tests', function () {

    test('notice', function () {

        trigger_error('This is a notice description', E_USER_NOTICE);



        expect(true)->toBeTrue();

    });
<?php });



test('user warning', function () {

    trigger_error('This is a warning description', E_USER_WARNING);



    expect(true)->toBeTrue();

});
<?php describe('a "describe" group of tests', function () {

    test('user warning', function () {

        trigger_error('This is a warning description', E_USER_WARNING);



        expect(true)->toBeTrue();

    });