php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9742 "die" crash
Submitted: 2001-03-14 11:14 UTC Modified: 2001-04-28 14:39 UTC
From: princeali at 263 dot net Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 4.0.4pl1 OS: Windows 98 SE 4.10.2222
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: princeali at 263 dot net
New email:
PHP Version: OS:

 

 [2001-03-14 11:14 UTC] princeali at 263 dot net
if you declare more than one class in a file,and place 'die();' as the final excutable statement,PHP will crash....

e.g:
<?php 
class T{
	var $q;
	function W(){
		echo 'Q';
	}
}

ob_start();
show_source(__FILE__);
$result=ob_get_contents();
ob_end_clean();
$a=false;
if ($a=='1'):
	echo 'Hi';
endif;
while(false){
	echo 'No';
}
$result=str_replace ("<br>", "\n", $result);
echo '<pre>'.strip_tags($result,'<font>').'</pre>';
die('');
class V{
	var $q;
	function W(){
		echo 'Q';
	}
}
?>
will make PHP crash,but
<?php 
/*
	***********************************************
	==  V  ==
	
	Designed by Alexander Fractal Soon ( Outrules )
	Published under LGPL(ANY version).
	***********************************************
*/
class T{
	var $q;
	function W(){
		echo 'Q';
	}
}

ob_start();
show_source(__FILE__);
$result=ob_get_contents();
ob_end_clean();
$a=false;
if ($a=='1'):
	echo 'Hi';
endif;
while(false){
	echo 'No';
}
$result=str_replace ("<br>", "\n", $result);
echo '<pre>'.strip_tags($result,'<font>').'</pre>';
die('');
;//if you add a executable statement here, it will be fine.
class V{
	var $q;
	function W(){
		echo 'Q';
	}
}
?>
is fine.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-04-28 14:39 UTC] jmoore@php.net
Can you please try:

<?php 
class T{
	var $q;
	function W(){
		echo 'Q';
	}
}
die('');
class V{
	var $q;
	function W(){
		echo 'Q';
	}
}
?>

I cant reproduce this on any of my setups. Please reopen if this problem persists under 4.0.5 (when its released) or 4.0.6-dev
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri Dec 06 10:01:25 2019 UTC