-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex2.php
More file actions
31 lines (26 loc) · 907 Bytes
/
index2.php
File metadata and controls
31 lines (26 loc) · 907 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
// curl https://loadfunc.github.io/php/apifunc.php --output apifunc.php
include 'apifunc.php';
# Function Async
apifunc(["https://php.apisql.com/api_sql.php"], function () {
api_sql('sqlite:db.sqlite3', "SELECT * FROM `member` ORDER BY `lastname` ASC", function ($fetch) {
var_dump($fetch);
var_dump($fetch['firstname']);
var_dump($fetch['lastname']);
var_dump($fetch['address']);
});
});
# Function Async
apifunc([
"https://letjson.github.io/php/let_json.php",
"https://php.apisql.com/api_sql.php"
], function () {
api_sql('sqlite:db.sqlite3', "SELECT * FROM `member` ORDER BY `lastname` ASC", function ($fetch) {
var_dump($fetch['firstname']);
var_dump($fetch['lastname']);
var_dump($fetch['address']);
$objs[] = let_json("https://js-example.letjson.com/letjson.json");
var_dump($objs);
});
});
?>