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> ";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 19
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/9JnDF
function name:  (null)
number of ops:  32
compiled vars:  !0 = $imgClass, !1 = $img, !2 = $title, !3 = $link, !4 = $BG_Img, !5 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   ASSIGN                                                   !0, 'no-img'
   14     1        ASSIGN                                                   !1, ''
   15     2        INIT_FCALL                                               'the_title'
          3        DO_FCALL                                      0  $8      
          4        ASSIGN                                                   !2, $8
   16     5        INIT_FCALL                                               'the_permalink'
          6        DO_FCALL                                      0  $10     
          7        ASSIGN                                                   !3, $10
   18     8        ADD                                              ~12     'background-image%3Aurl%28', !5
          9        ADD                                              ~13     ~12, '%29%3Bdisplay%3Ablock%3B'
         10        ASSIGN                                                   !4, ~13
   20    11        INIT_FCALL                                               'has_post_thumbnail'
         12        DO_FCALL                                      0  $15     
         13      > JMPZ                                                     $15, ->19
   21    14    >   ASSIGN                                                   !0, ''
   22    15        INIT_FCALL                                               'the_post_thumbnail'
         16        SEND_VAL                                                 'alm-thumbnail'
         17        DO_FCALL                                      0  $17     
         18        ASSIGN                                                   !1, $17
   25    19    >   ROPE_INIT                                    11  ~20     '%0A%3Cli+class%3D%27'
   26    20        ROPE_ADD                                      1  ~20     ~20, !0
         21        ROPE_ADD                                      2  ~20     ~20, '%27%3E%0A++++'
   27    22        ROPE_ADD                                      3  ~20     ~20, !1
         23        ROPE_ADD                                      4  ~20     ~20, '%0A++++%3Ch3%3E%0A++++++++%3Ca+href%3D%27'
   29    24        ROPE_ADD                                      5  ~20     ~20, !3
         25        ROPE_ADD                                      6  ~20     ~20, '%27+style%3D%27'
         26        ROPE_ADD                                      7  ~20     ~20, !4
         27        ROPE_ADD                                      8  ~20     ~20, '%27%3E'
         28        ROPE_ADD                                      9  ~20     ~20, !2
         29        ROPE_END                                     10  ~19     ~20, '%0A++++++++%3C%2Fa%3E%0A++++%3C%2Fh3%3E%0A%3C%2Fli%3E%0A'
         30        ECHO                                                     ~19
   33    31      > RETURN                                                   1

Function the_title:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9JnDF
function name:  the_title
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E > > RETURN                                                   'A+Title'
          1*     > RETURN                                                   null

End of function the_title

Function the_permalink:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9JnDF
function name:  the_permalink
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E > > RETURN                                                   'https%3A%2F%2Fgoogle.com'
          1*     > RETURN                                                   null

End of function the_permalink

Function has_post_thumbnail:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9JnDF
function name:  has_post_thumbnail
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E > > RETURN                                                   <true>
          1*     > RETURN                                                   null

End of function has_post_thumbnail

Function the_post_thumbnail:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9JnDF
function name:  the_post_thumbnail
number of ops:  3
compiled vars:  !0 = $whateverThisIs
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1      > RETURN                                                   '%3Cimg+src%3D%22https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fen%2F2%2F22%2FCharlie_Brown.png%22+%2F%3E'
    7     2*     > RETURN                                                   null

End of function the_post_thumbnail

Function get_post_custom_values:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9JnDF
function name:  get_post_custom_values
number of ops:  3
compiled vars:  !0 = $key, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ASSIGN                                                   !0, 'Gal_IMG'
   11     1        ASSIGN                                                   !1, 'https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FMain_Page%23%2Fmedia%2FFile%3ABepiColombo_spacecraft_model.png'
   12     2      > RETURN                                                   null

End of function get_post_custom_values

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.01 ms | 1403 KiB | 17 Q