Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MySQLi and PHP Database Applications
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Miniontoby
MySQLi and PHP Database Applications
Commits
6c28abd3
Commit
6c28abd3
authored
1 year ago
by
Miniontoby
Browse files
Options
Downloads
Patches
Plain Diff
Removed the temp function
parent
fc18c689
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
functions/basic.php
+0
-36
0 additions, 36 deletions
functions/basic.php
with
0 additions
and
36 deletions
functions/basic.php
+
0
−
36
View file @
6c28abd3
...
...
@@ -9,42 +9,6 @@ function set_method_variable_value($method, array $array = []): void {
}
set_method_variable_value
(
$_SERVER
,
[
'PHP_AUTH_USER'
,
'PHP_AUTH_PW'
,
'REMOTE_HOST'
,
'REMOTE_ADDR'
,
'REQUEST_URI'
]);
if
(
!
function_exists
(
'each'
))
{
// this is when php8.0 since each has been DEPRECATED as of PHP 7.2.0, and REMOVED as of PHP 8.0.0. Relying on this function is highly discouraged.
/*
so you should replace the functions
while( |)\(list\((\$\w+),( |)(\$\w+)\) = each\((\$\w+)\)\)( |)\{
foreach (\5 as \2 => \4) {
while( |)\(list\(,( |)(\$\w+)\) = each\((\$\w+)\)\)( |)\{
foreach (\4 as \3) {
while( |)\(list\((\$\w+)( |),\) = each\((\$\w+)\)\)( |)\{
foreach (array_keys(\4) as \2) {
*/
$usage
=
[];
function
each
(
&
$array
)
{
global
$usage
;
$id
=
md5
(
serialize
(
$array
));
if
(
!
in_array
(
$id
,
$usage
))
{
array_push
(
$usage
,
$id
);
echo
"Legacy each used!"
;
}
$key
=
key
(
$array
);
$value
=
current
(
$array
);
$each
=
is_null
(
$key
)
?
false
:
[
1
=>
$value
,
'value'
=>
$value
,
0
=>
$key
,
'key'
=>
$key
,
];
next
(
$array
);
return
$each
;
}
}
/*
********************************************************
*** This script from MySQL/PHP Database Applications ***
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment