3v4l.org

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

Function the_title:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s7s9c
function name:  the_title
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     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/s7s9c
function name:  the_permalink
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     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/s7s9c
function name:  has_post_thumbnail
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     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/s7s9c
function name:  the_post_thumbnail
number of ops:  3
compiled vars:  !0 = $whateverThisIs
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1      > RETURN                                                   '%3Cimg+src%3D%22https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fen%2F2%2F22%2FCharlie_Brown.png%22+%2F%3E'
    8     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/s7s9c
function name:  get_post_custom_values
number of ops:  4
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                                                   'https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FMain_Page%23%2Fmedia%2FFile%3ABepiColombo_spacecraft_model.png'
   13     3*     > RETURN                                                   null

End of function get_post_custom_values

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.6 ms | 1402 KiB | 18 Q