Skip to content

Instantly share code, notes, and snippets.

@iggyvolz
Created July 28, 2020 18:40
Show Gist options
  • Save iggyvolz/8f38cf4b800070cd322a21c8a73f7b94 to your computer and use it in GitHub Desktop.
Save iggyvolz/8f38cf4b800070cd322a21c8a73f7b94 to your computer and use it in GitHub Desktop.
zend_extension=opcache.so
opcache.enable=1
opcache.enable_cli=1
extension=parallel.so
opcache.preload=preloaded.php
<?php
echo "Executing Preloader".PHP_EOL;
class a
{
public static $b="foo";
public $c="bar";
public static function getB()
{
return self::$b;
}
}
<?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