|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-06-05 02:18 UTC] laruence@php.net
-Status: Open
+Status: Feedback
[2012-06-05 02:18 UTC] laruence@php.net
[2013-02-18 00:35 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 12:00:01 2025 UTC |
Description: ------------ I have been using a set of scripts and classes for about a year without problem until recent upgrade from Fedora 16 to 17, which brought with it PHP 5.4.3. I started seeing segfaults in apache and I eventually narrowed the problem to the use of the function name 'init()'. See the code below. After some experimentation, I found that by simply renaming the init() function to something else, like initialize(), then all works fine. fwiw, I do not have ZendFramework installed (I believe that framework uses init() function quite a bit). Test script: --------------- //DOES NOT WORK: class Foo { function __construct() { // construction functions $this->init(); } function init() { // init functions; } } //WORKS: class Bar{ function __construct() { // construction functions $this->initialize(); } function initialize() { // init functions; } } Expected result: ---------------- No segfault. Actual result: -------------- Segfault.