|
18 | 18 | echo $e->getMessage(), PHP_EOL;
|
19 | 19 | }
|
20 | 20 |
|
| 21 | +try { |
| 22 | + assert(false && $y = clone($x, )); |
| 23 | +} catch (Error $e) { |
| 24 | + echo $e->getMessage(), PHP_EOL; |
| 25 | +} |
| 26 | + |
21 | 27 | try {
|
22 | 28 | assert(false && $y = clone($x, [ "foo" => $foo, "bar" => $bar ]));
|
23 | 29 | } catch (Error $e) {
|
|
30 | 36 | echo $e->getMessage(), PHP_EOL;
|
31 | 37 | }
|
32 | 38 |
|
| 39 | +try { |
| 40 | + assert(false && $y = clone($x, $array, $extraParameter, $trailingComma, )); |
| 41 | +} catch (Error $e) { |
| 42 | + echo $e->getMessage(), PHP_EOL; |
| 43 | +} |
| 44 | + |
| 45 | +try { |
| 46 | + assert(false && $y = clone(object: $x, withProperties: [ "foo" => $foo, "bar" => $bar ])); |
| 47 | +} catch (Error $e) { |
| 48 | + echo $e->getMessage(), PHP_EOL; |
| 49 | +} |
| 50 | + |
| 51 | +try { |
| 52 | + assert(false && $y = clone($x, withProperties: [ "foo" => $foo, "bar" => $bar ])); |
| 53 | +} catch (Error $e) { |
| 54 | + echo $e->getMessage(), PHP_EOL; |
| 55 | +} |
| 56 | + |
| 57 | +try { |
| 58 | + assert(false && $y = clone(object: $x)); |
| 59 | +} catch (Error $e) { |
| 60 | + echo $e->getMessage(), PHP_EOL; |
| 61 | +} |
| 62 | + |
| 63 | +try { |
| 64 | + assert(false && $y = clone(object: $x, [ "foo" => $foo, "bar" => $bar ])); |
| 65 | +} catch (Error $e) { |
| 66 | + echo $e->getMessage(), PHP_EOL; |
| 67 | +} |
| 68 | + |
| 69 | +try { |
| 70 | + assert(false && $y = clone(...["object" => $x, "withProperties" => [ "foo" => $foo, "bar" => $bar ]])); |
| 71 | +} catch (Error $e) { |
| 72 | + echo $e->getMessage(), PHP_EOL; |
| 73 | +} |
| 74 | + |
33 | 75 | try {
|
34 | 76 | assert(false && $y = clone(...));
|
35 | 77 | } catch (Error $e) {
|
|
40 | 82 | --EXPECT--
|
41 | 83 | assert(false && ($y = \clone($x)))
|
42 | 84 | assert(false && ($y = \clone($x)))
|
| 85 | +assert(false && ($y = \clone($x))) |
43 | 86 | assert(false && ($y = \clone($x, ['foo' => $foo, 'bar' => $bar])))
|
44 | 87 | assert(false && ($y = \clone($x, $array)))
|
| 88 | +assert(false && ($y = \clone($x, $array, $extraParameter, $trailingComma))) |
| 89 | +assert(false && ($y = \clone(object: $x, withProperties: ['foo' => $foo, 'bar' => $bar]))) |
| 90 | +assert(false && ($y = \clone($x, withProperties: ['foo' => $foo, 'bar' => $bar]))) |
| 91 | +assert(false && ($y = \clone(object: $x))) |
| 92 | +assert(false && ($y = \clone(object: $x, ['foo' => $foo, 'bar' => $bar]))) |
| 93 | +assert(false && ($y = \clone(...['object' => $x, 'withProperties' => ['foo' => $foo, 'bar' => $bar]]))) |
45 | 94 | assert(false && ($y = \clone(...)))
|
0 commit comments