|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-06-02 23:29 UTC] msaladna at apisnetworks dot com
[2005-06-03 20:19 UTC] pollita@php.net
[2007-09-26 04:06 UTC] srfed at gdfh dot hf
[2008-06-22 11:36 UTC] mlively@php.net
[2009-03-23 23:50 UTC] sam dot kuper at uclmail dot net
[2009-03-24 02:21 UTC] philip at roshambo dot org
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 16:00:02 2025 UTC |
Description: ------------ affects runkit 0.2: The following code will fail when attempting to override the class via runkit_import(); however, if the class is derived from a base class via runkit_class_adopt such as runkit_class_adopt('Foo','Bar') for example, then the class can be overwritten without issue. Here is the configuration line: './configure' '--host=i386-redhat-linux' '--build=i386-redhat-linux' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--enable-force-cgi-redirect' '--disable-debug' '--enable-pic' '--disable-rpath' '--enable-inline-optimization' '--with-bz2' '--with-db4=/usr' '--with-curl' '--with-dom=/usr' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-gd' '--enable-gd-native-ttf' '--with-ttf' '--with-gdbm' '--with-gettext' '--with-ncurses' '--with-gmp' '--with-iconv' '--enable-pcntl' '--with-mysqli' '--with-jpeg-dir=/usr' '--with-openssl' '--enable-cli' '--with-png' '--with-pspell' '--with-regex=system' '--with-xml' '--with-expat-dir=/usr' '--with-pcre=/usr' '--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sigchild' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--without-oci8' '--with-pear=/usr/share/pear' '--with-imap' '--with-imap-ssl' '--with-kerberos=/usr/kerberos' '--with-mysql=/usr' '--with-pgsql' '--with-unixODBC' '--enable-memory-limit' '--enable-bcmath' '--enable-shmop' '--disable-versioning' '--enable-calendar' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-regex=system' '--with-xml' '--enable-sysvmsg' '--enable-sysvshm' '--enable-sysvsem' '--enable-soap' '--with-libxml' '--with-expat-dir=/usr' '--with-pcre=/usr' '--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--without-oci8' '--with-pear=/usr/share/pear' '--with-imap' '--with-imap-ssl' '--with-kerberos=/usr/kerberos' '--with-mysql=/usr' '--with-pgsql' '--with-unixODBC' '--enable-memory-limit' '--enable-bcmath' '--enable-shmop' '--enable-versioning' '--enable-calendar' '--enable-dbx' '--enable-dio' '--enable-mcal' '--with-apxs2=/usr/sbin/apxs' '--with-db4' '--enable-memory-limit' '--enable-maintainer-zts' '--program-suffix=5' '--with-config-file-path=/etc/php5' '--with-curl' '--with-mcrypt' Reproduce code: --------------- File testclass.php: <?php class Foo extends Bar { public function a() { print "Hello World!\n"; } } class Bar { public function b() { print "Hello World from Bar!\n"; } } ?> File test.php: <?php include('testclass.php'); $test = new Foo(); print($test->b()); runkit_import('testclass.php', RUNKIT_IMPORT_OVERRIDE); $test2 = new Foo(); print($test2->b()); ?> Expected result: ---------------- Hello World from Bar! Hello World from Bar! Actual result: -------------- Hello World from Bar! Fatal error: Cannot redeclare class foo in testclass.php on line 4