-
Notifications
You must be signed in to change notification settings - Fork 222
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
examples/testdata/php/php-extensions/devbox.d/php81/php-fpm.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[global] | ||
pid = ${PHPFPM_PID_FILE} | ||
error_log = ${PHPFPM_ERROR_LOG_FILE} | ||
daemonize = yes | ||
|
||
[www] | ||
; user = www-data | ||
; group = www-data | ||
listen = 127.0.0.1:${PHPFPM_PORT} | ||
; listen.owner = www-data | ||
; listen.group = www-data | ||
pm = dynamic | ||
pm.max_children = 5 | ||
pm.start_servers = 2 | ||
pm.min_spare_servers = 1 | ||
pm.max_spare_servers = 3 | ||
chdir = / |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"packages": [ | ||
"php81", | ||
"php81Packages.composer", | ||
"php81Extensions.ds" | ||
], | ||
"shell": { | ||
"init_hook": null | ||
}, | ||
"nixpkgs": { | ||
"commit": "f80ac848e3d6f0c12c52758c0f25c10c97ca3b62" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
// Check that the extension is loaded. | ||
if (!extension_loaded('ds')) { | ||
echo("ds extension is not enabled\n"); | ||
exit(1); | ||
} | ||
|
||
// use Ds\Vector; | ||
|
||
$vec = new \Ds\Vector(["hello", "world"]); | ||
|
||
echo("Original vector elements\n"); | ||
foreach ($vec as $idx => $elem) { | ||
echo("idx: $idx and elem: $elem\n"); | ||
} | ||
echo("done\n"); |