source: src/router/php7/Zend/tests/generators/generator_with_type_check.phpt @ 31874

Last change on this file since 31874 was 31874, checked in by brainslayer, 5 weeks ago

update php

File size: 434 bytes
Line 
1--TEST--
2Generator wit type check
3--FILE--
4<?php
5function gen(array $a) { yield; }
6gen(42);
7?>
8--EXPECTF--
9Fatal error: Uncaught TypeError: Argument 1 passed to gen() must be of the type array, integer given, called in %sgenerator_with_type_check.php on line 3 and defined in %sgenerator_with_type_check.php:2
10Stack trace:
11#0 %sgenerator_with_type_check.php(3): gen(42)
12#1 {main}
13  thrown in %sgenerator_with_type_check.php on line 2
Note: See TracBrowser for help on using the repository browser.