FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
php-src/sapi/phpdbg/test.php at in-place-array-modification-squashed · ndossche/php-src · GitHub
ndossche
/
php-src
Public
forked from
php/php-src
Notifications
You must be signed in to change notification settings
Fork
0
Star
2
Code
Pull requests
20
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
php-src
/
sapi
/
phpdbg
/
test.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
87 lines (65 loc) · 1.18 KB
Breadcrumbs
php-src
/
sapi
/
phpdbg
/
test.php
Copy path
File metadata and controls
87 lines (65 loc) · 1.18 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?php
if
(
isset
(
$
include
)) {
include
(
sprintf
(
"
%s/web-bootstrap.php
"
,
dirname
(
__FILE__
)));
}
$
stdout
=
fopen
(
"
php://stdout
"
,
"
w+
"
);
class
phpdbg {
private
$
sprintf
=
"
%s: %s
\n"
;
public
function
isGreat
(
$
greeting
=
null
) {
printf
(
$
this
->
sprintf
,
__METHOD__
,
$
greeting
);
return
$
this
;
}
}
function
mine
() {
var_dump
(
func_get_args
());
}
function
test
(
$
x
,
$
y
=
0
) {
$
var
=
$
x
+
1
;
$
var
+=
2
;
$
var
<<=
3
;
$
foo
=
function
() {
echo
"
bar!
\n"
;
};
$
foo
();
yield
$
var
;
}
$
dbg
=
new
phpdbg
();
var_dump
(
$
dbg
->
isGreat
(
"
PHP Rocks!!
"
));
foreach
(
test
(
1
,
2
)
as
$
gen
)
continue
;
echo
"
it works!
\n"
;
if
(
isset
(
$
dump
))
var_dump
(
$
_SERVER
);
function
phpdbg_test_ob
()
{
echo
'
Start
'
;
ob_start
();
echo
'
Hello
'
;
$
b
=
ob_get_clean
();
echo
'
End
'
;
echo
$
b
;
}
$
array
= [
1
,
2
,
[
3
,
4
],
[
5
,
6
],
];
$
array
[] =
7
;
array_walk
(
$
array
,
function
(&
$
item
) {
if
(
is_array
(
$
item
))
$
item
[
0
] +=
2
;
else
$
item
-=
1
;
});
class
testClass {
public
$
a
=
2
;
protected
$
b
= [
1
,
3
];
private
$
c
=
7
;
}
$
obj
=
new
testClass
;
$
test
=
$
obj
->
a
;
$
obj
->
a
+=
2
;
$
test
-=
2
;
unset(
$
obj
);
Back
|
FazBrowse Home
|
New Git URL