/php-src/Zend/tests/throw/ |
H A D | 001.phpt | 2 throw expression 7 $result = true && throw new Exception("true && throw"); 14 $result = false && throw new Exception("false && throw"); 21 $result = true and throw new Exception("true and throw"); 28 $result = false and throw new Exception("false and throw"); 35 $result = true || throw new Exception("true || throw"); 42 $result = false || throw new Exception("false || throw"); 49 $result = true or throw new Exception("true or throw"); 56 $result = false or throw new Exception("false or throw"); 63 $result = null ?? throw new Exception("null ?? throw"); [all …]
|
H A D | 002.phpt | 2 Test throw with various expressions 12 throw $this->createNotFoundException(); 20 throw static::staticCreateNotFoundException(); 37 throw true ? new Exception('Ternary true 1') : new Exception('Ternary true 2'); 43 throw false ? new Exception('Ternary false 1') : new Exception('Ternary false 2'); 51 throw $exception1 ?? $exception2; 59 throw $exception1 ?? $exception2; 65 throw $exception = new Exception('Assignment'); 72 throw $exception ??= new Exception('Coalesce assignment null'); 79 throw $exception ??= new Exception('Coalesce assignment non-null 2'); [all …]
|
H A D | leaks.phpt | 2 throw expression should not leak temporaries 7 new stdClass(throw new Exception); 14 ($a + [1]) + throw new Exception; 20 @throw new Exception;
|
/php-src/Zend/tests/generators/ |
H A D | throw_rethrow.phpt | 2 Generator::throw() where the generator throws a different exception 13 throw new LogicException('new throw'); 18 var_dump($gen->throw(new RuntimeException('throw'))); 23 Caught: RuntimeException: throw in %s:%d 28 Fatal error: Uncaught LogicException: new throw in %s:%d 31 #1 %s(%d): Generator->throw(Object(RuntimeException))
|
H A D | get_return_errors.phpt | 21 throw new Exception("gen2() throw"); 40 throw new Exception("gen3() throw"); 60 $gen->throw(new Exception("gen4() throw")); 66 // that was injected using throw() 75 gen2() throw 77 gen3() throw 78 gen4() throw
|
H A D | get_return_and_finally.phpt | 8 throw new Exception("gen1() throw"); 23 throw new Exception("gen2() throw"); 30 // This will throw an exception (from the finally) 46 gen2() throw
|
H A D | throw_not_an_exception.phpt | 2 Generator::throw() with something that's not an exception 11 $gen->throw(new stdClass); 15 Fatal error: Uncaught TypeError: Generator::throw(): Argument #1 ($exception) must be of type Throw… 17 #0 %s(%d): Generator->throw(Object(stdClass))
|
H A D | gh14387.phpt | 2 GH-14387 (Crash when stack walking in destructor of yielded from values during Generator->throw()) 14 throw new Exception; 21 $g->throw(new Error); 33 #2 %s(%d): Generator->throw(Object(Error))
|
/php-src/Zend/tests/exceptions/ |
H A D | exception_001.phpt | 10 throw new Exception(); 13 throw $e; 17 throw $e; 21 throw $e; 25 throw $e;
|
H A D | exception_006.phpt | 2 Trying to throw a non-object 6 throw 1; 10 Fatal error: Uncaught Error: Can only throw objects in %s:%d
|
/php-src/Zend/tests/temporary_cleaning/ |
H A D | temporary_cleaning_013.phpt | 9 function __destruct() { throw new Exception; } 15 function __destruct() { throw new Exception; } 22 function __destruct() { throw new Exception; } 29 function __destruct() { throw new Exception; } 39 function __destruct() { throw new Exception; } 49 function __destruct() { throw new Exception; } 61 function __destruct() { throw new Exception; } 74 function __destruct() { throw new Exception; } 82 function __destruct() { throw new Exception; } 90 function __destruct() { throw new Exception; } [all …]
|
/php-src/Zend/tests/ |
H A D | bug65784.phpt | 7 throw new Exception("not catch"); 11 throw new Exception("caught"); 28 throw new Exception("caught"); 32 throw new Exception("caught"); 45 throw new Exception("not caught"); 49 throw new NotExists();
|
H A D | bug33318.phpt | 2 Bug #33318 (throw 1; results in Invalid opcode 108/1/8) 5 throw 1; 8 Fatal error: Uncaught Error: Can only throw objects in %sbug33318.php:2
|
H A D | exception_set_previous_leak.phpt | 8 throw new Exception("Test"); 10 throw $e; 12 throw $e;
|
H A D | static_variables_throwing_initializer.phpt | 6 function foo($throw) { 7 static $a = $throw ? (throw new Exception('Throwing from foo()')) : 42;
|
H A D | bug70944.phpt | 8 throw new Exception("Bar", 0, $e); 10 throw $e; 19 throw new Exception("Bar", 0, $e); 21 throw new Exception("Dummy", 0, $e);
|
H A D | ErrorException_getSeverity.phpt | 16 throw new ErrorException(); 28 throw new ErrorException(EXCEPTION_PARAM_MSG); 40 throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR); 52 throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_ERROR); 64 throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_WARNING); 76 throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_PARSE); 88 throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_NOTICE); 100 throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_CORE_ERROR); 112 throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_CORE_WARNING); 160 throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_USER_ERROR); [all …]
|
/php-src/ext/reflection/tests/property_hooks/ |
H A D | ReflectionProperty_isInitialized.phpt | 11 public $v1 { get => throw new Exception(); } 12 public $v2 { set { throw new Exception(); } } 14 public $b1 { get => throw new Exception($this->b1); } 15 public string $b2 { get => throw new Exception($this->b2); } 16 public $b3 { set => throw new Exception(); } 17 public string $b4 { set => throw new Exception(); }
|
/php-src/Zend/tests/return_types/ |
H A D | never_covariance.phpt | 15 throw new UnexpectedValueException('parent'); 31 throw new UnexpectedValueException('bad'); 36 throw new UnexpectedValueException('child'); 41 throw new UnexpectedValueException('child'); 46 throw new UnexpectedValueException('child');
|
/php-src/Zend/tests/function_arguments/ |
H A D | sensitive_parameter_value_keeps_object_alive.phpt | 24 function test(#[SensitiveParameter] CustomDestructor $o, bool $throw) 26 if ($throw) { 27 throw new Exception('Error'); 31 function wrapper(int $id, bool $throw) 34 test($o, $throw);
|
/php-src/Zend/tests/try/ |
H A D | try_finally_002.phpt | 2 Try finally (re-throw exception in finally block) 7 throw new Exception("try"); 9 throw new Exception("finally");
|
H A D | catch_finally_001.phpt | 5 function foo ($throw = FALSE) { 8 if ($throw) { 9 throw new Exception("ex");
|
H A D | catch_novar_1.phpt | 7 throw new Exception(); 13 throw new Exception(); 21 throw new Exception();
|
H A D | catch_finally_006.phpt | 2 Try catch finally (re-throw exception in catch block) 7 throw new Exception("ex"); 10 throw $e;
|
/php-src/tests/classes/ |
H A D | iterators_007.phpt | 10 …public function rewind(): void { if ($this->x == 0) throw new Exception(__METHOD__); reset($thi… 11 …public function current(): mixed { if ($this->x == 1) throw new Exception(__METHOD__); return cu… 12 …public function key(): mixed { if ($this->x == 2) throw new Exception(__METHOD__); return ke… 13 …public function next(): void { if ($this->x == 3) throw new Exception(__METHOD__); next($this… 14 …public function valid(): bool { if ($this->x == 4) throw new Exception(__METHOD__); return (ke…
|