3v4l.org

run code in 300+ PHP versions simultaneously
<?php function the_title() { return 'A Title';} function the_permalink() { return 'https://google.com';} function has_post_thumbnail() { return true;} function the_post_thumbnail($whateverThisIs) { return '<img src="https://upload.wikimedia.org/wikipedia/en/2/22/Charlie_Brown.png" />'; } function get_post_custom_values() { $key = 'Gal_IMG'; $value = 'https://en.wikipedia.org/wiki/Main_Page#/media/File:BepiColombo_spacecraft_model.png'; } $imgClass = 'no-img'; $img = ''; $title = the_title(); $link = the_permalink(); // $BG_Img = 'background-image:url('+ $value +');display:block;'; // if(has_post_thumbnail()) { $imgClass = ''; $img = the_post_thumbnail('alm-thumbnail'); } echo " <li class='${imgClass}'> ${img} <h3> <a href='${link}' style='${BG_Img}'>${title} </a> </h3> </li> ";
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /in/9JnDF on line 25 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /in/9JnDF on line 26 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /in/9JnDF on line 27 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /in/9JnDF on line 29 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /in/9JnDF on line 29 Warning: Undefined variable $value in /in/9JnDF on line 18 Fatal error: Uncaught TypeError: Unsupported operand types: string + null in /in/9JnDF:18 Stack trace: #0 {main} thrown in /in/9JnDF on line 18
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:
44.74 ms | 402 KiB | 8 Q