mirror of
https://github.com/php/php-src.git
synced 2026-04-23 07:58:20 +02:00
5b3809e942
Similar to what we do with attributes, add a dummy call frame on which we can set the strict_types flag.
16 lines
361 B
PHP
16 lines
361 B
PHP
--TEST--
|
|
Exception thrown during SCCP evaluation, strict types variation
|
|
--FILE--
|
|
<?php
|
|
|
|
declare(strict_types=1);
|
|
var_dump(str_contains("123", 1));
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Uncaught TypeError: str_contains(): Argument #2 ($needle) must be of type string, int given in %s:%d
|
|
Stack trace:
|
|
#0 %s(%d): str_contains('123', 1)
|
|
#1 {main}
|
|
thrown in %s on line %d
|