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

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

update php

File size: 239 bytes
Line 
1--TEST--
2Can't use name of lexical variable for parameter
3--FILE--
4<?php
5
6$a = 1;
7$fn = function ($a) use ($a) {
8    var_dump($a);
9};
10$fn(2);
11
12?>
13--EXPECTF--
14Fatal error: Cannot use lexical variable $a as a parameter name in %s on line %d
Note: See TracBrowser for help on using the repository browser.