Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7402990
skip-linting.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
629 B
Referenced Files
None
Subscribers
None
skip-linting.php
View Options
<?php
$stdin
=
fopen
(
'php://stdin'
,
'r'
);
$input
=
stream_get_contents
(
$stdin
);
fclose
(
$stdin
);
foreach
(
explode
(
PHP_EOL
,
$input
)
as
$file
)
{
$skip
=
false
;
$f
=
@
fopen
(
$file
,
'r'
);
if
(
$f
)
{
$firstLine
=
fgets
(
$f
);
// ignore shebang line
if
(
strpos
(
$firstLine
,
'#!'
)
===
0
)
{
$firstLine
=
fgets
(
$f
);
}
@
fclose
(
$f
);
if
(
preg_match
(
'~<?php
\\
s*
\\
/
\\
/
\s
*lint
\s
*([^
\d\s
]+)
\s
*([^
\s
]+)
\s
*~i'
,
$firstLine
,
$m
))
{
$skip
=
version_compare
(
PHP_VERSION
,
$m
[
2
],
$m
[
1
])
===
false
;
}
}
echo
$file
.
';'
.
(
$skip
?
'1'
:
'0'
)
.
PHP_EOL
;
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Nov 21, 18:22 (19 h, 37 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
e0/97/b2e890c1fa5e63055206324664de
Default Alt Text
skip-linting.php (629 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment