Feeds
Artikel
Kommentare

New Error Messages Below are the new error messages that have not been discussed elsewhere in this document. Beispiel #1 In PHP Core <?phpecho ” ”;session_regenerate_id();/*  Warning:  session_regenerate_id(): Cannot regenerate    session id - headers already sent in filename on line n */ str_word_count(“string”, 4);/* Warning:  str_word_count(): Invalid format value 4   in filename on line n */ strripos(“foo”, ”f”, 4);/* Notice:  strripos(): Offset is greater than the   length of haystack string in filename on line n */ strrpos(“foo”, ”f”, 4);/* Notice:  strrpos(): Offset is greater than the   length of haystack string in filename on line n */ /* As of PHP 5.2.1, when allow_url_include is OFF (default) */include ”php://input”;/* Warning:  include(): URL file-access is disabled   in the server configuration in filename on line n */?> Beispiel #2 Object Oriented Code in PHP Core <?phpinterface foo {}class bar implements foo, foo {}/* Fatal error: Class bar cannot implement previously   implemented interface foo in filename on line n */ class foo {    public $bar;    function __get($var)    {        return $this->bar;    }} $foo = new foo;$bar =& $foo->prop;/* Notice: Indirect modification of overloaded property   foo::$prop has no effect in filename on line n */ class foo implements iterator {    public function current() {    }    public function next() {    }    public function key() {    }    public function valid() {    }    public function rewind() {    }} $foo = new foo();foreach($foo as &$ref) {}/* Fatal error: An iterator cannot be used with foreach   by reference in filename on line n */ class foo {    private function __construct() {    }}class bar extends foo {    public function __construct() {        parent::__construct();        /* Fatal error:  Cannot call private           foo::__construct() in filename on line n */    }}new bar; stream_filter_register(“”, ”class”);/* Warning:  stream_filter_register(): Filter name   cannot be empty in filename on line n */ stream_filter_register(“filter”, ”");/* Warning:  stream_filter_register(): Class name   cannot be empty in filename on line n */?> Beispiel #3 In the bzip2 Extension <?phpbzopen(“”, ”w”);/* Warning:  bzopen(): filename cannot be empty   in filename on line n */ bzopen(“foo”, ”a”);/* Warning:  bzopen(): ’a' is not a valid mode for   bzopen(). Only ’w' and ’r' are supported in   filename on line n */ $fp = fopen(“foo”, ”w”);bzopen($fp, ”r”);/* Warning:  bzopen(): cannot read from a stream   opened in write only mode in filename on line n */?> Beispiel #4 [...]

Zend API: Hacking the Core of PHP Introduction Those who know don't talk. Those who talk don't know. Sometimes, PHP "as is" simply isn't enough. Although these cases are rare for the average user, professional applications will soon lead PHP to the edge of its capabilities, in terms of either speed or functionality. New functionality [...]

Compiling PECL extensions statically into PHP You might find that you need to build a PECL extension statically into your PHP binary. To do this, you'll need to place the extension source under the php-src/ext/ directory and tell the PHP build system to regenerate its configure script. $ cd /your/phpsrcdir/ext$ pecl download extname$ gzip -d [...]

Geschichte von PHP verwandten Projekten PEAR » PEAR, das PHP Extension and Application Repository (ursprünglich PHP Extension and Add-on Repository) ist PHP's Version von fundamentalen Klassen, und könnte in der Zukunft zu einem der Hauptwege zur Verteilung von PHP Erweiterungen unter Entwicklern werden. PEAR entstand in Diskussionen während des PHP Developers' Meeting (PDM) vom Januar [...]

« Zurück - Nächste »