3v4l.org

run code in 300+ PHP versions simultaneously
<?php // inside index.php $extra_scripts = ['file03.js']; ?> // now moving into header.php <?php $import_scripts = array_merge(array( 'file01.js', 'file02.js' ), $extra_scripts ?? []); ?> <!DOCTYPE html> <html> <head> <!-- Scripts Section --> <?php foreach ($import_scripts as $script) { echo '<script src="' . $script . '"></script>' . PHP_EOL; } ?><title>Demo</title> </head> <body> <p>Blog</p>
Output for git.master, git.master_jit, rfc.property-hooks
// now moving into header.php <!DOCTYPE html> <html> <head> <!-- Scripts Section --> <script src="file01.js"></script> <script src="file02.js"></script> <script src="file03.js"></script> <title>Demo</title> </head> <body> <p>Blog</p>

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:
28.04 ms | 406 KiB | 5 Q