3v4l.org

run code in 300+ PHP versions simultaneously
<?php use Amp\MultiProcess\PhpDispatcher, Amp\MultiProcess\CallResult, Amp\ReactorFactory; require dirname(__DIR__) . '/autoload.php'; require __DIR__ . '/support_files/async_mailer/MyAsyncMailer.php'; $reactor = (new ReactorFactory)->select(); $include = __DIR__ . '/support_files/async_mailer/StaticMailWorker.php'; $dispatcher = new PhpDispatcher($reactor, $include, $workerProcessesToSpawn = 8); $mailer = new MyAsyncMailer($dispatcher); $mailJobs = [ [$to ='test1@test.com', $from='address@me.com', $subject='my test', $body='body', $headers=[]], [$to ='test2@test.com', $from='address@me.com', $subject='my test', $body='body', $headers=[]], [$to ='test3@test.com', $from='address@me.com', $subject='my test', $body='body', $headers=[]], [$to ='test4@test.com', $from='address@me.com', $subject='my test', $body='body', $headers=[]], [$to ='test5@test.com', $from='address@me.com', $subject='my test', $body='body', $headers=[]], [$to ='test6@test.com', $from='address@me.com', $subject='my test', $body='body', $headers=[]], [$to ='test7@test.com', $from='address@me.com', $subject='my test', $body='body', $headers=[]], [$to ='test8@test.com', $from='address@me.com', $subject='my test', $body='body', $headers=[]] ]; // Kick things off when the reactor starts $reactor->once(function() use ($mailer, $mailJobs) { $mailer->dispatch($mailJobs); }); // Release the hounds! This should always be the last thing that happens in the script. $reactor->run();
Output for git.master, git.master_jit, rfc.property-hooks
Warning: require(): open_basedir restriction in effect. File(//autoload.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/ArmdI on line 7 Warning: require(//autoload.php): Failed to open stream: Operation not permitted in /in/ArmdI on line 7 Fatal error: Uncaught Error: Failed opening required '//autoload.php' (include_path='.:') in /in/ArmdI:7 Stack trace: #0 {main} thrown in /in/ArmdI on line 7
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
51.23 ms | 402 KiB | 8 Q