3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [['a', 'b']]; echo "<!DOCTYPE html> <html> <head> <style> table { width: 100%; max-width: 100%; margin-bottom: 20px; } th, td { white-space: nowrap } thead { text-align: left } </style> </head> <body> <table> <thead> <tr> <?php foreach (array_keys(reset($array)) as $heading): ?> <th><?php echo ucwords(strtr($heading, ['_' => ' '])); ?></th> <?php endforeach; ?> </tr> </thead> <tbody> <?php foreach ($array as $sub_array): ?> <tr> <?php foreach ($sub_array as $value): ?> <td><?php echo $value; ?></td> <?php endforeach; ?> </tr> <?php endforeach; ?> </tbody> </table> </body> </html>";
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Array to string conversion in /in/8QRXm on line 26 Warning: Undefined variable $heading in /in/8QRXm on line 26 Warning: Undefined variable $heading in /in/8QRXm on line 27 Warning: Array to string conversion in /in/8QRXm on line 33 Warning: Undefined variable $sub_array in /in/8QRXm on line 33 Warning: Undefined variable $sub_array in /in/8QRXm on line 35 Warning: Undefined variable $value in /in/8QRXm on line 35 Warning: Undefined variable $value in /in/8QRXm on line 36 <!DOCTYPE html> <html> <head> <style> table { width: 100%; max-width: 100%; margin-bottom: 20px; } th, td { white-space: nowrap } thead { text-align: left } </style> </head> <body> <table> <thead> <tr> <?php foreach (array_keys(reset(Array)) as ): ?> <th><?php echo ucwords(strtr(, ['_' => ' '])); ?></th> <?php endforeach; ?> </tr> </thead> <tbody> <?php foreach (Array as ): ?> <tr> <?php foreach ( as ): ?> <td><?php echo ; ?></td> <?php endforeach; ?> </tr> <?php endforeach; ?> </tbody> </table> </body> </html>

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:
45.9 ms | 404 KiB | 8 Q