Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8fda629
commit b4f46f0
Showing
10 changed files
with
77 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
language: php | ||
|
||
php: | ||
- 5.2 | ||
- 5.3 | ||
- 5.4 | ||
- 5.5 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--TEST-- | ||
set_exit_overload() with an uncaught exception with a named function | ||
--SKIPIF-- | ||
<?php | ||
if (!extension_loaded('test_helpers')) die('skip test_helpers extension not loaded'); | ||
?> | ||
--FILE-- | ||
<?php | ||
function _exit($arg = NULL) { throw new Exception("Please don't segfault"); } | ||
set_exit_overload('_exit'); | ||
try { | ||
exit("hi"); | ||
} catch(Exception $exception) { | ||
echo $exception->getMessage(); | ||
} | ||
?> | ||
--EXPECT-- | ||
Please don't segfault |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--TEST-- | ||
set_exit_overload() with a named function | ||
--SKIPIF-- | ||
<?php | ||
if (!extension_loaded('test_helpers')) die('skip test_helpers extension not loaded'); | ||
?> | ||
--FILE-- | ||
<?php | ||
function _exit1($arg = NULL) { var_dump($arg); echo "FALSE\n"; return false; } | ||
set_exit_overload('_exit1'); | ||
die("DIE 1"); | ||
die; | ||
exit; | ||
function _exit2($arg = NULL) { var_dump($arg); echo "TRUE\n"; return true; } | ||
set_exit_overload('_exit2'); | ||
die("DIE 4"); | ||
echo "HAHA"; | ||
?> | ||
--EXPECT-- | ||
string(5) "DIE 1" | ||
FALSE | ||
NULL | ||
FALSE | ||
NULL | ||
FALSE | ||
string(5) "DIE 4" | ||
TRUE | ||
DIE 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--TEST-- | ||
set_exit_overload() with a named function | ||
--SKIPIF-- | ||
<?php | ||
if (!extension_loaded('test_helpers')) die('skip test_helpers extension not loaded'); | ||
?> | ||
--FILE-- | ||
<?php | ||
function _exit() { echo "FALSE\n"; return false; } | ||
set_exit_overload('_exit'); | ||
unset_exit_overload(); | ||
die("DIE"); | ||
echo "HAHA"; | ||
?> | ||
--EXPECT-- | ||
DIE |