3v4l.org

run code in 300+ PHP versions simultaneously
<?php // NO! /* <li<?php if (! has_post_thumbnail() ) { echo ' class="no-img"'; } ?>> <?php if ( has_post_thumbnail() ) { the_post_thumbnail('alm-thumbnail'); }?> <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3> </li> */ $imgClass = 'no-img'; $img = ''; $title = the_title(); $link = the_permalink(); if(has_post_thumbnail()) { $imgClass = ''; $img = the_post_thumbnail('alm-thumbnail'); } // look!!! here you can debug and check the values of $img and other things to check your logic etc //HTML output starts HERE: ?> echo " <li class='${imgClass}'> ${img} <h3><a href='${link}'>${title}</a></h3> </li> "; // or other output idea
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 16
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/cqJZE
function name:  (null)
number of ops:  18
compiled vars:  !0 = $imgClass, !1 = $img, !2 = $title, !3 = $link
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ASSIGN                                                   !0, 'no-img'
   13     1        ASSIGN                                                   !1, ''
   14     2        INIT_FCALL_BY_NAME                                       'the_title'
          3        DO_FCALL                                      0  $6      
          4        ASSIGN                                                   !2, $6
   15     5        INIT_FCALL_BY_NAME                                       'the_permalink'
          6        DO_FCALL                                      0  $8      
          7        ASSIGN                                                   !3, $8
   16     8        INIT_FCALL_BY_NAME                                       'has_post_thumbnail'
          9        DO_FCALL                                      0  $10     
         10      > JMPZ                                                     $10, ->16
   17    11    >   ASSIGN                                                   !0, ''
   18    12        INIT_FCALL_BY_NAME                                       'the_post_thumbnail'
         13        SEND_VAL_EX                                              'alm-thumbnail'
         14        DO_FCALL                                      0  $12     
         15        ASSIGN                                                   !1, $12
   25    16    >   ECHO                                                     'echo+%22%0A%3Cli+class%3D%27%24%7BimgClass%7D%27%3E%0A++++%24%7Bimg%7D%0A++++%3Ch3%3E%3Ca+href%3D%27%24%7Blink%7D%27%3E%24%7Btitle%7D%3C%2Fa%3E%3C%2Fh3%3E%0A%3C%2Fli%3E%0A%22%3B%0A%0A%2F%2F+or+other+output+idea'
   32    17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.52 ms | 1393 KiB | 13 Q