Created
October 8, 2015 17:32
-
-
Save bpteam/889f9c260fdb5bde83dd to your computer and use it in GitHub Desktop.
die without gc
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 | |
var_dump(gc_enabled()); | |
gc_disable(); | |
var_dump(gc_enabled()); | |
class Demo | |
{ | |
function __construct() | |
{ | |
echo "constructor\n"; | |
} | |
function __destruct() | |
{ | |
echo "destructor\n"; | |
} | |
public function test() | |
{ | |
echo "in test \n"; | |
} | |
} | |
(new Demo())->test(); | |
echo "after die class\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
return
bool(true)
bool(false)
constructor
in test
destructor
after die class