Last active
December 15, 2015 05:09
-
-
Save fprochazka/5206656 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| <?php | |
| function handle($throw = FALSE) | |
| { | |
| try { | |
| try { | |
| throw new \LogicException('invalid xml'); | |
| } catch (\Exception $e) { | |
| throw new \LogicException('', 0, $e); // wrap | |
| } | |
| } catch (\LogicException $e) { | |
| echo "ok\n"; | |
| } catch (\Exception $e) { | |
| echo "ok\n"; | |
| } | |
| } | |
| try { | |
| handle(); | |
| } catch (\Exception $e) { | |
| die('FUCKING BUG'); | |
| } |
This file contains hidden or 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
| #!/bin/bash | |
| php bug.php | |
| # outputs: ok | |
| php -S localhost:8080 & | |
| curl http://localhost:8080/bug.php | |
| # outputs: FUCKING BUG |
PHP 5.4.13 (cli) (built: Mar 15 2013 02:07:14)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
with Xdebug v2.2.1, Copyright (c) 2002-2012, by Derick Rethans
OK
Author
Fakt to nechápu, pořád mi to blbne i s čistou instalací php... No ještěže jsem to nešel aktivně reportovat :)
Tak u PHP 5.3.10-1ubuntu3.6 with Suhosin-Patch to pro jistotu nefunguje, protože nemá parametr -S
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PHP 5.4.11 (cli) (built: Jan 16 2013 20:26:43)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
with Xdebug v2.2.1, Copyright (c) 2002-2012, by Derick Rethans
OK