Lines:
101 to 200 of 1116
/************************************************************************************* * php.php * -------- * Author: Nigel McNie (nigel@geshi.org) * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/) * Release Version: 1.0.9.0 * Date Started: 2004/06/20 * * PHP language file for GeSHi. * * CHANGES * ------- * 2008/05/23 (1.0.7.22) * - Added description of extra language features (SF#1970248) * 2004/11/25 (1.0.3) * - Added support for multiple object splitters * - Fixed &new problem * 2004/10/27 (1.0.2) * - Added URL support * - Added extra constants * 2004/08/05 (1.0.1) * - Added support for symbols * 2004/07/14 (1.0.0) * - First Release * * TODO (updated 2004/07/14) * ------------------------- * * Make sure the last few function I may have missed * (like eval()) are included for highlighting * * Split to several files - php4, php5 etc * ************************************************************************************* * * This file is part of GeSHi. * * GeSHi is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * GeSHi is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GeSHi; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ************************************************************************************/ $language_data = array( 'LANG_NAME' => 'PHP', 'COMMENT_SINGLE' => array(1 => '//', 2 => '#'), 'COMMENT_MULTI' => array('/*' => '*/'), 'COMMENT_REGEXP' => array( //Heredoc and Nowdoc syntax 3 => '/<<<\s*?(\'?)([a-zA-Z0-9]+?)\1[^\n]*?\\n.*\\n\\2(?![a-zA-Z0-9])/siU', // phpdoc comments 4 => '#/\*\*(?![\*\/]).*\*/#sU', // Advanced # handling 2 => "/#.*?(?:(?=\?\>)|^)/smi" ), 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, 'QUOTEMARKS' => array('"'), 'ESCAPE_CHAR' => '', 'ESCAPE_REGEXP' => array( //Simple Single Char Escapes 1 => "#\\\\[nfrtv\$\"\n\\\\]#i", //Hexadecimal Char Specs 2 => "#\\\\x[\da-fA-F]{1,2}#i", //Octal Char Specs 3 => "#\\\\[0-7]{1,3}#", //String Parsing of Variable Names 4 => "#\\$[a-z0-9_]+(?:\\[[a-z0-9_]+\\]|->[a-z0-9_]+)?|(?:\\{\\$|\\$\\{)[a-z0-9_]+(?:\\[('?)[a-z0-9_]*\\1\\]|->[a-z0-9_]+)*\\}#i", //Experimental extension supporting cascaded {${$var}} syntax 5 => "#\$[a-z0-9_]+(?:\[[a-z0-9_]+\]|->[a-z0-9_]+)?|(?:\{\$|\$\{)[a-z0-9_]+(?:\[('?)[a-z0-9_]*\\1\]|->[a-z0-9_]+)*\}|\{\$(?R)\}#i", //Format String support in ""-Strings 6 => "#%(?:%|(?:\d+\\\\\\\$)?\\+?(?:\x20|0|'.)?-?(?:\d+|\\*)?(?:\.\d+)?[bcdefFosuxX])#" ), 'HARDQUOTE' => array("'", "'"), 'HARDESCAPE' => array("'", "\\"), 'HARDCHAR' => "\\", 'NUMBERS' => GESHI_NUMBER_INT_BASIC | GESHI_NUMBER_OCT_PREFIX | GESHI_NUMBER_HEX_PREFIX | GESHI_NUMBER_FLT_SCI_ZERO, 'KEYWORDS' => array( 1 => array( 'as','break','case','continue','default','do','else','elseif', 'endfor','endforeach','endif','endswitch','endwhile','for', 'foreach','if','include','include_once','require','require_once', 'return','switch','throw','while', 'yield', 'echo','print' ), 2 => array( '&new','</script>','<?php','<script language', 'abstract','class','const','declare','extends','function','global', 'implements', 'interface','namespace','new','private','protected', 'public','Telf','trait','use','var' ), 3 => array( 'abs','acos','acosh','addcslashes','addslashes','aggregate', 'aggregate_methods','aggregate_methods_by_list', 'aggregate_methods_by_regexp','aggregate_properties', 'aggregate_properties_by_list','aggregate_properties_by_regexp', 'aggregation_info','apache_child_terminate','apache_get_modules', 'apache_get_version','apache_getenv','apache_lookup_uri', 'apache_note','apache_request_headers','apache_response_headers', 'apache_setenv','array','array_change_key_case','array_chunk', 'array_combine','array_count_values','array_diff', 'array_diff_assoc','array_diff_key','array_diff_uassoc', 'array_diff_ukey','array_fill','array_fill_keys','array_filter', 'array_flip','array_intersect','array_intersect_assoc', 'array_intersect_key','array_intersect_uassoc', 'array_intersect_ukey','array_key_exists','array_keys','array_map', 'array_merge','array_merge_recursive','array_multisort','array_pad', 'array_pop','array_product','array_push','array_rand', 'array_reduce','array_reverse','array_search','array_shift', 'array_slice','array_splice','array_sum','array_udiff', 'array_udiff_assoc','array_udiff_uassoc','array_uintersect', 'array_uintersect_assoc','array_uintersect_uassoc','array_unique', 'array_unshift','array_values','array_walk','array_walk_recursive', 'arsort','asin','asinh','asort','assert','assert_options','atan', 'atan2','atanh','base_convert','base64_decode','base64_encode', 'basename','bcadd','bccomp','bcdiv','bcmod','bcmul', 'bcompiler_load','bcompiler_load_exe','bcompiler_parse_class', 'bcompiler_read','bcompiler_write_class','bcompiler_write_constant', 'bcompiler_write_exe_footer','bcompiler_write_file', 'bcompiler_write_footer','bcompiler_write_function', 'bcompiler_write_functions_from_file','bcompiler_write_header', 'bcompiler_write_included_filename','bcpow','bcpowmod','bcscale', 'bcsqrt','bcsub','bin2hex','bindec','bindtextdomain', 'bind_textdomain_codeset','bitset_empty','bitset_equal', 'bitset_excl','bitset_fill','bitset_from_array','bitset_from_hash', 'bitset_from_string','bitset_in','bitset_incl', 'bitset_intersection','bitset_invert','bitset_is_empty', 'bitset_subset','bitset_to_array','bitset_to_hash', 'bitset_to_string','bitset_union','blenc_encrypt','bzclose', 'bzcompress','bzdecompress','bzerrno','bzerror','bzerrstr', 'bzflush','bzopen','bzread','bzwrite','cal_days_in_month', 'cal_from_jd','cal_info','cal_to_jd','call_user_func', 'call_user_func_array','call_user_method','call_user_method_array', 'ceil','chdir','checkdate','checkdnsrr','chgrp','chmod','chop', 'chown','chr','chunk_split','class_exists','class_implements', 'class_parents','classkit_aggregate_methods', 'classkit_doc_comments','classkit_import','classkit_method_add', 'classkit_method_copy','classkit_method_redefine', 'classkit_method_remove','classkit_method_rename','clearstatcache', 'closedir','closelog','com_create_guid','com_event_sink', 'com_get_active_object','com_load_typelib','com_message_pump', 'com_print_typeinfo','compact','confirm_phpdoc_compiled', 'connection_aborted','connection_status','constant', 'convert_cyr_string','convert_uudecode','convert_uuencode','copy', 'cos','cosh','count','count_chars','cpdf_add_annotation', 'cpdf_add_outline','cpdf_arc','cpdf_begin_text','cpdf_circle', 'cpdf_clip','cpdf_close','cpdf_closepath', 'cpdf_closepath_fill_stroke','cpdf_closepath_stroke', 'cpdf_continue_text','cpdf_curveto','cpdf_end_text','cpdf_fill', 'cpdf_fill_stroke','cpdf_finalize','cpdf_finalize_page', 'cpdf_global_set_document_limits','cpdf_import_jpeg','cpdf_lineto', 'cpdf_moveto','cpdf_newpath','cpdf_open','cpdf_output_buffer', 'cpdf_page_init','cpdf_rect','cpdf_restore','cpdf_rlineto', 'cpdf_rmoveto','cpdf_rotate','cpdf_rotate_text','cpdf_save', 'cpdf_save_to_file','cpdf_scale','cpdf_set_action_url', 'cpdf_set_char_spacing','cpdf_set_creator','cpdf_set_current_page', 'cpdf_set_font','cpdf_set_font_directories', 'cpdf_set_font_map_file','cpdf_set_horiz_scaling', 'cpdf_set_keywords','cpdf_set_leading','cpdf_set_page_animation', 'cpdf_set_subject','cpdf_set_text_matrix','cpdf_set_text_pos', 'cpdf_set_text_rendering','cpdf_set_text_rise','cpdf_set_title', 'cpdf_set_viewer_preferences','cpdf_set_word_spacing', 'cpdf_setdash','cpdf_setflat','cpdf_setgray','cpdf_setgray_fill', 'cpdf_setgray_stroke','cpdf_setlinecap','cpdf_setlinejoin', 'cpdf_setlinewidth','cpdf_setmiterlimit','cpdf_setrgbcolor', 'cpdf_setrgbcolor_fill','cpdf_setrgbcolor_stroke','cpdf_show', 'cpdf_show_xy','cpdf_stringwidth','cpdf_stroke','cpdf_text', 'cpdf_translate','crack_check','crack_closedict', 'crack_getlastmessage','crack_opendict','crc32','create_function', 'crypt','ctype_alnum','ctype_alpha','ctype_cntrl','ctype_digit', 'ctype_graph','ctype_lower','ctype_print','ctype_punct', 'ctype_space','ctype_upper','ctype_xdigit','curl_close', 'curl_copy_handle','curl_errno','curl_error','curl_exec', 'curl_getinfo','curl_init','curl_multi_add_handle', 'curl_multi_close','curl_multi_exec','curl_multi_getcontent', 'curl_multi_info_read','curl_multi_init','curl_multi_remove_handle', 'curl_multi_select','curl_setopt','curl_setopt_array', 'curl_version','current','cvsclient_connect','cvsclient_log', 'cvsclient_login','cvsclient_retrieve','date','date_create', 'date_date_set','date_default_timezone_get', 'date_default_timezone_set','date_format','date_isodate_set', 'date_modify','date_offset_get','date_parse','date_sun_info', 'date_sunrise','date_sunset','date_time_set','date_timezone_get', 'date_timezone_set','db_id_list','dba_close','dba_delete', 'dba_exists','dba_fetch','dba_firstkey','dba_handlers','dba_insert', 'dba_key_split','dba_list','dba_nextkey','dba_open','dba_optimize', 'dba_popen','dba_replace','dba_sync','dbase_add_record', 'dbase_close','dbase_create','dbase_delete_record', 'dbase_get_header_info','dbase_get_record', 'dbase_get_record_with_names','dbase_numfields','dbase_numrecords',View on GitHub View on Trac