1
0
mirror of https://github.com/php/php-src.git synced 2026-04-23 07:58:20 +02:00
Files
archived-php-src/ext/opcache/tests/opt/sccp_exception3.phpt
T
Nikita Popov 5b3809e942 Respect strict_types during sccp function call evaluation
Similar to what we do with attributes, add a dummy call frame
on which we can set the strict_types flag.
2020-11-27 20:24:00 +01:00

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