-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix __halt_compiler() pretty printing edge case
We can't strip the <?php at the end of a __halt_compiler() segment in file mode. Fixed by being a bit more explicit in prettyPrintFile() about what we want to do...
- Loading branch information
Showing
2 changed files
with
38 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
__halt_compiler | ||
----- | ||
<?php | ||
|
||
echo 'foo'; | ||
__halt_compiler(); | ||
!!! | ||
??? | ||
----- | ||
<?php | ||
|
||
echo 'foo'; | ||
__halt_compiler(); | ||
!!! | ||
??? | ||
----- | ||
<?php | ||
|
||
echo 'foo'; | ||
__halt_compiler(); | ||
<?php | ||
----- | ||
<?php | ||
|
||
echo 'foo'; | ||
__halt_compiler(); | ||
<?php |