Has Bare Bones (BB) or anyone else have a updated BBEdit plist PHP Language Module or improved the internal "PHP Keywords.txt" file (BBEdit.app/Contents/Resources/PHP Keywords.txt) within the current BBEdit 8.6.1 app with "all" of the PHP 4 & 5 reserved keywords, functions, etc.?

I recently noticed that one of my PHP script wasn't highlighting certain PHP reserved constants, like "CURLOPT_ENCODING" used with cURL related functions like curl_setopt(). (See more such reserved constants at: http://www.php.net/manual/en/function.curl-setopt.php )

I can modify the appropriate files myself, but was looking to see if this had already been done (i.e. looking for a short cut. ;)

BB should also update their own PHP recognitions internally in the BBEdit app for distribution as they are outdated.

To help this update along, for BB and others to look at...

The following PHP Code will generate a list of "some" reserved words in PHP. (Note: run this script in current versions of both PHP4 AND PHP5 as they produce different lists and combine. Or, even better create three different Language Module versions, one for each PHP version and a combined version.)


<?php

/*
WARNING / CAUTION:
This script may be a security issue as it discloses a lot of server information, so preferably use it only on a testing, non-production server environment. i.e. on a non-public Mac OS X system with Apache and PHP enabled.
*/

// Preferably set register_globals temporarily in php.ini, (or in custom installs php4.ini, or php5.ini),
// Used for fully describing $GLOBALS
ini_set('register_globals','on');

// Other PHP ini directive options "may' be possible to display even more reserved words. ???
// See: http://www.php.net/manual/en/ini.php#ini.list

echo "<html><body>\n";

// Textarea Tag added for security and readability,
// font style used for Safari browsers which don't use fixed width fonts in textareas be default echo '<form action=""><textarea name="reserved_words" cols="125" rows="50" readOnly="" style="background:yellow; font-family: Monaco !important; font-size: 8pt;">';
echo "<br />\n";

echo "Defined Reserved Word Constants:<br />\n-------------------<br />\n";
print_r(get_defined_constants());
echo "<br />\n";

echo "Defined Functions:<br />\n-------------------<br />\n";
print_r(get_defined_functions());
echo "<br />\n";

echo "Built-In Declared Classes:<br />\n-------------------<br />\n";
print_r(get_declared_classes());
echo "<br />\n";

echo "Defined Resource Types:<br />\n-------------------<br />\n";
print_r(get_resource_type());
echo "<br />\n";

echo "Defined Global Variables:<br />\n-------------------<br />\n";
print_r($GLOBALS);
echo "<br />\n";

echo "Defined php.ini Directives:<br />\n-------------------<br />\n";
print_r(ini_get_all());
echo "<br />\n";

// There may be several more options and functions that could also be used here.

echo '</textarea></form>';

echo '</body></html>';

?>


I also recommend reviewing the PHP's Reserved Word documentation at
http://www.php.net/manual/en/reserved.php   (and its various subpages)

Also, it could also be useful to review other major text editors' and IDE programs' syntax highlighting configuration files for PHP.

It would be even better if BB also supported syntax highlighting for major PHP standard classes like in:
PEAR libraries ( http;//pear.php.net ) and
PECL extensions (http://pecl.php.net)
& various other libraries, modules, and add-ons.

[RELATED-TOPICS]
P.S. Since BB is used for a lot of Web Development work, BB please add Apache and PHP Configuration File recognition to your list of recognized files with syntax highlighting.

For reference see BBEdit Language Module work done by the following: Apache Configuration Files (httpd.conf & .htaccess) -> http://daringfireball.net/projects/apacheconfig/ PHP Configuration Files (php.ini, php4.ini, & php5.ini) -> http://janpieter.xs4all.nl/plist/

P.P.S. Any body have any great web sites with lists and links to more BBEdit Language Modules? Note: BB this would be a great thing to have an updated list on your own web site.

--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to:  <[EMAIL PROTECTED]>

Reply via email to