iliaa           Wed Apr  6 10:19:14 2005 EDT

  Modified files:              
    /php-src    NEWS 
    /php-src/ext/standard       basic_functions.c basic_functions.h 
  Log:
  Removed php_check_syntax() function, it never worked properly. For now
  use shell_exec("php -l script_name") or similar.
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1865&r2=1.1866&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1865 php-src/NEWS:1.1866
--- php-src/NEWS:1.1865 Wed Apr  6 08:26:29 2005
+++ php-src/NEWS        Wed Apr  6 10:19:13 2005
@@ -8,6 +8,7 @@
   . ext/mnogosearch (Jani, Derick)
   . ext/w32api      (Jani, Derick)
   . ext/yp          (Jani, Derick)
+- Removed php_check_syntax() function, never worked properly.
 - Changed stream_filter_(ap|pre)pend() to return resource. (Sara)
 - Changed mysqli_exception and sqlite_exception to use RuntimeException as 
base 
   if SPL extension is present. (Georg, Marcus)
http://cvs.php.net/diff.php/php-src/ext/standard/basic_functions.c?r1=1.707&r2=1.708&ty=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.707 
php-src/ext/standard/basic_functions.c:1.708
--- php-src/ext/standard/basic_functions.c:1.707        Thu Mar 10 09:33:53 2005
+++ php-src/ext/standard/basic_functions.c      Wed Apr  6 10:19:14 2005
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: basic_functions.c,v 1.707 2005/03/10 14:33:53 zeev Exp $ */
+/* $Id: basic_functions.c,v 1.708 2005/04/06 14:19:14 iliaa Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -480,7 +480,6 @@
        PHP_FALIAS(show_source,                 highlight_file,                 
                                NULL)
        PHP_FE(highlight_string,                                                
                                                NULL)
        PHP_FE(php_strip_whitespace,                                            
                                                NULL)
-       PHP_FE(php_check_syntax,                                                
                                                second_arg_force_ref)
 
        PHP_FE(ini_get,                                                         
                                                        NULL)
        PHP_FE(ini_get_all,                                                     
                                                        NULL)
@@ -2429,49 +2428,6 @@
 }
 /* }}} */
 
-/* {{{ proto bool php_check_syntax(string file_name [, &$error_message])
-   Check the syntax of the specified file. */
-PHP_FUNCTION(php_check_syntax)
-{
-       char *filename;
-       int filename_len;
-       zval *errm=NULL;
-       zend_file_handle file_handle = {0};
-
-       int old_errors = PG(display_errors);
-       int log_errors = PG(log_errors);
-
-       if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|z", &filename, 
&filename_len, &errm) == FAILURE) {
-               RETURN_FALSE;
-       }
-
-       file_handle.type = ZEND_HANDLE_FILENAME;
-       file_handle.filename = filename;
-       file_handle.free_filename = 0;
-       file_handle.opened_path = NULL; 
-
-       PG(log_errors) = PG(display_errors) = 0;
-
-       if (php_lint_script(&file_handle TSRMLS_CC) != SUCCESS) {
-               if (errm) {
-                       char *error_str;
-
-                       zval_dtor(errm);
-                       spprintf(&error_str, 0, "%s in %s on line %d", 
PG(last_error_message), PG(last_error_file), PG(last_error_lineno));
-                       ZVAL_STRING(errm, error_str, 0);
-               }
-               RETVAL_FALSE;
-       } else {
-               RETVAL_TRUE;
-       }
-
-       PG(display_errors) = old_errors;
-       PG(log_errors) = log_errors;
-
-       return;
-}
-/* }}} */
-
 /* {{{ proto bool highlight_string(string string [, bool return] )
    Syntax highlight a string or optionally return it */
 PHP_FUNCTION(highlight_string)
http://cvs.php.net/diff.php/php-src/ext/standard/basic_functions.h?r1=1.135&r2=1.136&ty=u
Index: php-src/ext/standard/basic_functions.h
diff -u php-src/ext/standard/basic_functions.h:1.135 
php-src/ext/standard/basic_functions.h:1.136
--- php-src/ext/standard/basic_functions.h:1.135        Sat Aug  7 11:59:59 2004
+++ php-src/ext/standard/basic_functions.h      Wed Apr  6 10:19:14 2005
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: basic_functions.h,v 1.135 2004/08/07 15:59:59 pollita Exp $ */
+/* $Id: basic_functions.h,v 1.136 2005/04/06 14:19:14 iliaa Exp $ */
 
 #ifndef BASIC_FUNCTIONS_H
 #define BASIC_FUNCTIONS_H
@@ -88,7 +88,6 @@
 PHP_FUNCTION(highlight_file);
 PHP_FUNCTION(highlight_string);
 PHP_FUNCTION(php_strip_whitespace);
-PHP_FUNCTION(php_check_syntax);
 ZEND_API void php_get_highlight_struct(zend_syntax_highlighter_ini 
*syntax_highlighter_ini);
 
 PHP_FUNCTION(ini_get);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to