Follow us on Twitter!
Your life is ending one minute at a time. If you were to die tomorrow, what would you do today?
Friday, April 18, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 18
Guests Online: 15
Members Online: 3

Registered Members: 82822
Newest Member: TheBunter
Latest Articles
View Thread

HellBound Hackers | Computer General | Programming

Page 2 of 2 < 1 2
Author

RE: Stupid Javascript/HTML

chess_rock
Member



Posts: 244
Location:
Joined: 20.02.08
Rank:
Apprentice
Posted on 28-09-08 18:10
well, had to revive this thread discussion... I was taking a look in W3 tutorials about languages i didn't know anything about, and i realized that ASP language makes use of the symbols: <? ?>...

now comes the question... since php is really living this "simplification era", how can a computer identify if what is being written is ASP or PHP? anyone knows?
Author

RE: Stupid Javascript/HTML


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 28-09-08 18:12
chess_rock wrote:
now comes the question... since php is really living this "simplification era", how can a computer identify if what is being written is ASP or PHP? anyone knows?

Syntax differences and, if there's not a rewrite rule in effect, the file extensions.


Author

RE: Stupid Javascript/HTML

fashizzlepop
Member



Posts: 482
Location: Old folks home.
Joined: 08.04.08
Rank:
Moderate
Posted on 28-09-08 20:24
The server usually looks at the extension to see how to parse/compile it.
It doesn't just look at the "<? ?>" vs "<?php ?>" for example. Only would a web browser need that kind of identification difference.


"The definition of insanity is doing the same thing over and over again and expecting different results.
~Albert Einstein~


csullivan.codeinspire.net/images/boomsig2.png
fashizzlepop@gmail.com http://csullivan.codeinspire.net/
Author

RE: Stupid Javascript/HTML


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 28-09-08 20:49
Nice catch... my pre-coffee post originally saw the question as being human perception, not server perception. Regardless, whether just habit or not, I find it easier to read the code when the tags are used as such:

<?php ?> = PHP
<? ?> = PHP shorthand
<% %> = ASP
<script></script> = Javascript

While they may all be used with PHP at any given time, we really have to ask how much of an optimization we'd gain from using the alternatives to <?php ?>... as opposed to retaining the readability of various code.


Page 2 of 2 < 1 2