|
30 | 30 | echo $e->getMessage(), PHP_EOL;
|
31 | 31 | }
|
32 | 32 |
|
| 33 | +try { |
| 34 | + assert(false && $y = clone($x, $array, $extraParameter, $trailingComma, )); |
| 35 | +} catch (Error $e) { |
| 36 | + echo $e->getMessage(), PHP_EOL; |
| 37 | +} |
| 38 | + |
| 39 | +try { |
| 40 | + assert(false && $y = clone(object: $x, withProperties: [ "foo" => $foo, "bar" => $bar ])); |
| 41 | +} catch (Error $e) { |
| 42 | + echo $e->getMessage(), PHP_EOL; |
| 43 | +} |
| 44 | + |
| 45 | +try { |
| 46 | + assert(false && $y = clone($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(object: $x)); |
| 53 | +} catch (Error $e) { |
| 54 | + echo $e->getMessage(), PHP_EOL; |
| 55 | +} |
| 56 | + |
| 57 | +try { |
| 58 | + assert(false && $y = clone(object: $x, [ "foo" => $foo, "bar" => $bar ])); |
| 59 | +} catch (Error $e) { |
| 60 | + echo $e->getMessage(), PHP_EOL; |
| 61 | +} |
| 62 | + |
| 63 | +try { |
| 64 | + assert(false && $y = clone(...["object" => $x, "withProperties" => [ "foo" => $foo, "bar" => $bar ]])); |
| 65 | +} catch (Error $e) { |
| 66 | + echo $e->getMessage(), PHP_EOL; |
| 67 | +} |
| 68 | + |
| 69 | +try { |
| 70 | + assert(false && $y = clone(...)); |
| 71 | +} catch (Error $e) { |
| 72 | + echo $e->getMessage(), PHP_EOL; |
| 73 | +} |
| 74 | + |
33 | 75 | ?>
|
34 | 76 | --EXPECT--
|
35 |
| -assert(false && ($y = clone($x))) |
36 |
| -assert(false && ($y = clone($x))) |
37 |
| -assert(false && ($y = clone($x, ['foo' => $foo, 'bar' => $bar]))) |
38 |
| -assert(false && ($y = clone($x, $array))) |
| 77 | +assert(false && ($y = \clone($x))) |
| 78 | +assert(false && ($y = \clone($x))) |
| 79 | +assert(false && ($y = \clone($x, ['foo' => $foo, 'bar' => $bar]))) |
| 80 | +assert(false && ($y = \clone($x, $array))) |
| 81 | +assert(false && ($y = \clone($x, $array, $extraParameter, $trailingComma))) |
| 82 | +assert(false && ($y = \clone(object: $x, withProperties: ['foo' => $foo, 'bar' => $bar]))) |
| 83 | +assert(false && ($y = \clone($x, withProperties: ['foo' => $foo, 'bar' => $bar]))) |
| 84 | +assert(false && ($y = \clone(object: $x))) |
| 85 | +assert(false && ($y = \clone(object: $x, ['foo' => $foo, 'bar' => $bar]))) |
| 86 | +assert(false && ($y = \clone(...['object' => $x, 'withProperties' => ['foo' => $foo, 'bar' => $bar]]))) |
| 87 | +assert(false && ($y = \clone(...))) |
0 commit comments