Skip to content

Instantly share code, notes, and snippets.

@beberlei
Created December 8, 2019 12:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save beberlei/67cb3682af3cf6599307765cd30c5222 to your computer and use it in GitHub Desktop.
Save beberlei/67cb3682af3cf6599307765cd30c5222 to your computer and use it in GitHub Desktop.

This works:

$ php7.4 -S localhost:8080 -dopcache.enable_cli=1 -dopcache.preload=declare_preload.php run.php
<?php
define('PEAR_ERROR_RETURN', 1);
class PEAR_Error
{
var $mode = PEAR_ERROR_RETURN;
}
<?php
const PEAR_ERROR_RETURN = 1;
opcache_compile_file(__DIR__ . '/declare.php');
<?php
$error = new PEAR_Error();
var_dump($error);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment