Skip to content

Commit 0d76ae2

Browse files
committed
Resolve GitHub reviews
1 parent adacaf2 commit 0d76ae2

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

Zend/zend_language_scanner.l

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2033,7 +2033,7 @@ string:
20332033
<INITIAL>"<?" {
20342034
if (CG(short_tags)) {
20352035
if (CG(short_tags_notice) == 0) {
2036-
zend_error(E_DEPRECATED, "PHP Short tags are deprecated as of PHP 7.4 and will be removed in a future version");
2036+
zend_error(E_DEPRECATED, "PHP short tags are deprecated. This message will not be printed for further short tags uses. First usage");
20372037
CG(short_tags_notice) = 1;
20382038
}
20392039
BEGIN(ST_IN_SCRIPTING);

tests/lang/short_tags.001.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ echo "Used a short tag\n";
88
?>
99
Finished
1010
--EXPECTF--
11-
Deprecated: PHP Short tags are deprecated as of PHP 7.4 and will be removed in a future version in %s on line %d
11+
Deprecated: PHP short tags are deprecated. This message will not be printed for further short tags uses. First usage in %s on line %d
1212
Used a short tag
1313
Finished
Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
11
--TEST--
22
Unique PHP short tag deprecation with multiple short tags used
33
--FILE--
4+
<?php
5+
echo "Used a normal tags\n";
6+
?>
47
<?
58
echo "Used a short tag\n";
69
?>
10+
Non PHP content
711
<?php
8-
echo "Use a normal tags\n";
12+
echo "Another normal tag\n";
913
?>
10-
Non PHP content
1114
<?
1215
echo "Another short tag\n";
1316
?>
1417
Finished
1518
--EXPECTF--
16-
Deprecated: PHP Short tags are deprecated as of PHP 7.4 and will be removed in a future version in %s on line %d
19+
Deprecated: PHP short tags are deprecated. This message will not be printed for further short tags uses. First usage in %s on line 4
20+
Used a normal tags
1721
Used a short tag
18-
Use a normal tags
1922
Non PHP content
23+
Another normal tag
2024
Another short tag
2125
Finished

0 commit comments

Comments
 (0)