My favorites | Sign in
Google
                
New issue | Search
for
| Advanced search | Search tips
Issue 3: PHP support
  Back to list
Status:  Fixed
Owner:  mikesamuel
Closed:  Apr 2007
Type-Defect
Priority-Medium


Sign in to add a comment
 
Reported by mikesamuel, Mar 22, 2007
Philip says,

> Any chance you add support for those ugly PHP variables in the form of
> $this? Yeah, I hate PHP too, I still use it because it's better
> supported than Python on my server :)
Comment 1 by mikesamuel, Mar 22, 2007
I don't know much PHP but there seems to be a grammar at
http://www.csci.csusb.edu/dick/samples/php.syntax.html#PHP%20Identifiers

It seems to differ from perl in that identifiers don't start with [$@%] instead
starting with $+.

Strings ( http://www.csci.csusb.edu/dick/samples/php.syntax.html#Scalar%20Types )
start and end with quotes, so there's no need to try and handle perl strings which
would break every other language.

Can you point me at a code sample that illustrates good PHP style?

And how does PHP embed in html?  Is it the <? ... ?> or and <?php ... ?> style embedding?
Comment 2 by dirg...@gmail.com, Mar 22, 2007
Depends on which php version your using.

php4
-----
<? and ?>

php5
-----
<?php and ?>
Comment 3 by vykintas.narmontas, Mar 23, 2007
I believe that you should make it only for <?php ?>
dirgesh: this works for php4 too. 
Your was is a very old way and I doubt that the majority use it anyway.
Comment 4 by maxwell.lamb, Mar 23, 2007
What? Lots of people use <? and ?>, and also syntax such as <?=$foo?> for a quick echo.
Comment 5 by mikesamuel, Apr 02, 2007
I believe this is fixed.  Changes recorded at
http://google-code-prettify.googlecode.com/svn/trunk/CHANGES.html

Please see tests at
http://google-code-prettify.googlecode.com/svn/trunk/tests/prettify_test.html#PHP
Status: Fixed
Sign in to add a comment