diff options
Diffstat (limited to 'tests/lang/array_shortcut_003.phpt')
-rw-r--r-- | tests/lang/array_shortcut_003.phpt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/lang/array_shortcut_003.phpt b/tests/lang/array_shortcut_003.phpt new file mode 100644 index 0000000..75e428b --- /dev/null +++ b/tests/lang/array_shortcut_003.phpt @@ -0,0 +1,13 @@ +--TEST-- +Testing array shortcut and bracket operator +--FILE-- +<?php +$a = [1, 2, 3, 4, 5]; +print_r([$a[1], $a[3]]); +?> +--EXPECT-- +Array +( + [0] => 2 + [1] => 4 +) |