3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Data { public function __construct($i) { $this->i = $i; } public function getNumber() { return $this->i; } } $data = array_map(function($item) { return new Data($item); }, range(1, 100)); for ($i = 0; $i < 10000; ++$i) { echo array_reduce($data, function ($acc, $item) { return $acc + $item->getNumber(); }, 0); }

Abusive script

This script was stopped while abusing our resources