3v4l.org

run code in 300+ PHP versions simultaneously
<?php class FooTable { public function getTable() { $table_cells = range(1, 100); $table = $this->chunk($table_cells, 10); foreach ($table as $row) { echo implode(' | ', $row) . PHP_EOL; } } public function chunk(array $array, $chunk_size) { $index = 0; while ($index < count($array)) { yield array_slice($array, $index, $chunk_size, true); $index += $chunk_size; } } } $foo = new FooTable; echo $foo->getTable();
Output for git.master, git.master_jit, rfc.property-hooks
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100

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:
57.73 ms | 402 KiB | 8 Q