Skip to content

Commit b29dd63

Browse files
committed
Fix PHP Version Close #35 & OPCache Rest Close #36
A bit formatting
1 parent df84dff commit b29dd63

File tree

6 files changed

+12
-8
lines changed

6 files changed

+12
-8
lines changed

0

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
8.2.8

base/_functions.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,4 @@ benchmark () {
9090
fi
9191

9292
echo "$url" >> "$url_file"
93-
94-
echo
9593
}

base/hello_world.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ if [ -f "$url_file" ]; then
3333
mv "$url_file" "$url_file.old"
3434
fi
3535

36-
37-
phpv=`php -r 'echo phpversion();'`
38-
echo "/------- PHP $phpv -------/"
36+
phpc=`curl -s "$base/libs/php_config.php"`
37+
echo "/------- PHP Config -------/"
38+
echo "$phpc"
3939

4040
for fw in `echo $param_targets`
4141
do
4242
if [ -d "$fw" ]; then
43-
echo "/------- $fw -------/"
43+
echo "\n/------- $fw -------/"
4444

4545
# read -p "Continue to $fw (y/n)?" choice
4646
# case "$choice" in
@@ -67,7 +67,8 @@ do
6767
# fi
6868

6969
# reset the opcache
70-
php ./libs/reset_opcache.php
70+
opcacherest=`curl -s "$base/libs/reset_opcache.php"`
71+
echo "$opcacherest"
7172

7273
if [ "$param_restart_apache" = true ]; then
7374
echo 'systemctl restart apache2'

benchmark.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,5 @@ done
8181

8282
sh ./base/hello_world.sh
8383

84+
echo ''
8485
php ./libs/show_results_table.php

libs/php_config.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
echo 'PHP: '.phpversion().PHP_EOL;
3+
echo 'OPCache: '.(is_array(opcache_get_status()) ? 'On' : 'Off').PHP_EOL;

libs/reset_opcache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<?php
22

3-
opcache_reset();
3+
echo 'opcache_reset: '. (opcache_reset()?'done':'disabled/pending');

0 commit comments

Comments
 (0)