summaryrefslogtreecommitdiff
path: root/test.php
diff options
context:
space:
mode:
authorlouie <lshprung@yahoo.com>2020-09-20 09:26:58 -0700
committerlouie <lshprung@yahoo.com>2020-09-20 09:26:58 -0700
commita8c0d5619ee6d518737628d6c585233d0bba23da (patch)
tree30c13cf2439700c78d51acc9b430cb5fa092f963 /test.php
First commit
Diffstat (limited to 'test.php')
-rw-r--r--test.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/test.php b/test.php
new file mode 100644
index 0000000..c1c7c22
--- /dev/null
+++ b/test.php
@@ -0,0 +1,17 @@
+<?php
+ //////////GLOBAL VARIABLES/
+ global $dice_arr;
+ $dice_arr = [];
+ for($i=1; $i<=6; $i++){
+ array_push($dice_arr, $i . ".png");
+ }
+ ///////////////////////////
+ function dice_rand(){
+ $dice_arr = $GLOBALS['dice_arr'];
+ $e = random_int(0, 5);
+ return $dice_arr[$e];
+ }
+
+ print dice_rand();
+
+?> \ No newline at end of file