Created
July 28, 2020 18:40
-
-
Save iggyvolz/8f38cf4b800070cd322a21c8a73f7b94 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
zend_extension=opcache.so | |
opcache.enable=1 | |
opcache.enable_cli=1 | |
extension=parallel.so | |
opcache.preload=preloaded.php |
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 | |
echo "Executing Preloader".PHP_EOL; | |
class a | |
{ | |
public static $b="foo"; | |
public $c="bar"; | |
public static function getB() | |
{ | |
return self::$b; | |
} | |
} |
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 | |
parallel\run(function(){ | |
var_dump(a::$b); // returns correct value, but segfaults at end of program | |
var_dump(a::getB()); // returns correct value, but segfaults at end of program | |
$a = new a; // does not segfault | |
var_dump($a->c); // returns correct value, does not segfault | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment