Skip to content

Commit

Permalink
Fix PHP Version Close #35 & OPCache Rest Close #36
Browse files Browse the repository at this point in the history
A bit formatting
  • Loading branch information
myaaghubi committed Jul 30, 2023
1 parent df84dff commit b29dd63
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 8 deletions.
1 change: 1 addition & 0 deletions 0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8.2.8
2 changes: 0 additions & 2 deletions base/_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,4 @@ benchmark () {
fi

echo "$url" >> "$url_file"

echo
}
11 changes: 6 additions & 5 deletions base/hello_world.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ if [ -f "$url_file" ]; then
mv "$url_file" "$url_file.old"
fi


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

for fw in `echo $param_targets`
do
if [ -d "$fw" ]; then
echo "/------- $fw -------/"
echo "\n/------- $fw -------/"

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

# reset the opcache
php ./libs/reset_opcache.php
opcacherest=`curl -s "$base/libs/reset_opcache.php"`
echo "$opcacherest"

if [ "$param_restart_apache" = true ]; then
echo 'systemctl restart apache2'
Expand Down
1 change: 1 addition & 0 deletions benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,5 @@ done

sh ./base/hello_world.sh

echo ''
php ./libs/show_results_table.php
3 changes: 3 additions & 0 deletions libs/php_config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php
echo 'PHP: '.phpversion().PHP_EOL;
echo 'OPCache: '.(is_array(opcache_get_status()) ? 'On' : 'Off').PHP_EOL;
2 changes: 1 addition & 1 deletion libs/reset_opcache.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php

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

0 comments on commit b29dd63

Please sign in to comment.