3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); $imgClass = 'no-img'; $img = ''; $title = the_title(); $link = the_permalink(); // $BG_Img = get_post_custom_values('GalIMG') ; $BG_Img = $BG_Img[0]; if(has_post_thumbnail()) { $imgClass = ''; $img = the_post_thumbnail('alm-thumbnail'); } echo " <li class='${imgClass}'> ${img} <h3> <a href='${link}' style='background-image:url('${BG_Img}'); display:block;'>${title} </a> </h3> </li> ";
Output for 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /in/u3fr1 on line 16 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /in/u3fr1 on line 17 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /in/u3fr1 on line 18 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /in/u3fr1 on line 20 Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /in/u3fr1 on line 20 Fatal error: Uncaught Error: Call to undefined function the_title() in /in/u3fr1:5 Stack trace: #0 {main} thrown in /in/u3fr1 on line 5
Process exited with code 255.
Output for 7.1.0 - 7.1.23, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.27
Fatal error: Uncaught Error: Call to undefined function the_title() in /in/u3fr1:5 Stack trace: #0 {main} thrown in /in/u3fr1 on line 5
Process exited with code 255.
Output for 5.6.38
Warning: Unsupported declare 'strict_types' in /in/u3fr1 on line 2 Fatal error: Call to undefined function the_title() in /in/u3fr1 on line 5
Process exited with code 255.

preferences:
161.16 ms | 401 KiB | 169 Q