3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_product = $this->getProduct() ?> <?php if($_product->isSaleable()): ?> <div class="add-to-cart"> <?php if(!$_product->isGrouped()): ?> <div class="my-qty"> <label for="qty"><?php echo $this->__('Qty:') ?></label> <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo $this->getMinimalQty($_product) ?>" title="<?php echo $this->__('Qty') ?>" class="input-text qty" /> </div> <?php endif; ?> <button id='cartBtn' onmouseout="javascript:changeBgImage('<?php echo $this->getSkinUrl(); ?>images/addToCart.png',this);" onmouseover="javascript:changeBgImage('<?php echo $this->getSkinUrl(); ?>images/AddToCartROLL.png',this);" type="button" title="<?php echo $this->__('Add to Cart') ?>" class="add-to-cart-new" onclick="productAddToCartForm.submit()">&nbsp;</button> <script type="text/Javascript"> function changeBgImage (image , id) { element = id; element.style.background = "url('"+image+"')"; /* "url('"+image+"')"; */ } </script> </div> <?php endif; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 49
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 32
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
Branch analysis from position: 49
filename:       /in/FqHe2
function name:  (null)
number of ops:  50
compiled vars:  !0 = $_product
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   FETCH_THIS                                       $1      
          1        INIT_METHOD_CALL                                         $1, 'getProduct'
          2        DO_FCALL                                      0  $2      
          3        ASSIGN                                                   !0, $2
    2     4        ECHO                                                     '%0A'
    3     5        INIT_METHOD_CALL                                         !0, 'isSaleable'
          6        DO_FCALL                                      0  $4      
          7      > JMPZ                                                     $4, ->49
    4     8    >   ECHO                                                     '%0A++++%3Cdiv+class%3D%22add-to-cart%22%3E%0A++++++++'
    6     9        INIT_METHOD_CALL                                         !0, 'isGrouped'
         10        DO_FCALL                                      0  $5      
         11        BOOL_NOT                                         ~6      $5
         12      > JMPZ                                                     ~6, ->32
    7    13    >   ECHO                                                     '%09%09%3Cdiv+class%3D%22my-qty%22%3E%0A++++++++%3Clabel+for%3D%22qty%22%3E'
    8    14        FETCH_THIS                                       $7      
         15        INIT_METHOD_CALL                                         $7, '__'
         16        SEND_VAL_EX                                              'Qty%3A'
         17        DO_FCALL                                      0  $8      
         18        ECHO                                                     $8
         19        ECHO                                                     '%3C%2Flabel%3E%0A++++++++%3Cinput+type%3D%22text%22+name%3D%22qty%22+id%3D%22qty%22+maxlength%3D%2212%22+value%3D%22'
    9    20        FETCH_THIS                                       $9      
         21        INIT_METHOD_CALL                                         $9, 'getMinimalQty'
         22        SEND_VAR_EX                                              !0
         23        DO_FCALL                                      0  $10     
         24        ECHO                                                     $10
         25        ECHO                                                     '%22+title%3D%22'
         26        FETCH_THIS                                       $11     
         27        INIT_METHOD_CALL                                         $11, '__'
         28        SEND_VAL_EX                                              'Qty'
         29        DO_FCALL                                      0  $12     
         30        ECHO                                                     $12
         31        ECHO                                                     '%22+class%3D%22input-text+qty%22+%2F%3E%0A%09%09%3C%2Fdiv%3E%0A++++++++'
   12    32    >   ECHO                                                     '++++++++%3Cbutton+id%3D%27cartBtn%27+onmouseout%3D%22javascript%3AchangeBgImage%28%27'
         33        FETCH_THIS                                       $13     
         34        INIT_METHOD_CALL                                         $13, 'getSkinUrl'
         35        DO_FCALL                                      0  $14     
         36        ECHO                                                     $14
         37        ECHO                                                     'images%2FaddToCart.png%27%2Cthis%29%3B%22+onmouseover%3D%22javascript%3AchangeBgImage%28%27'
         38        FETCH_THIS                                       $15     
         39        INIT_METHOD_CALL                                         $15, 'getSkinUrl'
         40        DO_FCALL                                      0  $16     
         41        ECHO                                                     $16
         42        ECHO                                                     'images%2FAddToCartROLL.png%27%2Cthis%29%3B%22+type%3D%22button%22+title%3D%22'
         43        FETCH_THIS                                       $17     
         44        INIT_METHOD_CALL                                         $17, '__'
         45        SEND_VAL_EX                                              'Add+to+Cart'
         46        DO_FCALL                                      0  $18     
         47        ECHO                                                     $18
         48        ECHO                                                     '%22+class%3D%22add-to-cart-new%22+onclick%3D%22productAddToCartForm.submit%28%29%22%3E%26nbsp%3B%3C%2Fbutton%3E%0A%09%09+%3Cscript+type%3D%22text%2FJavascript%22%3E%0A%09%09%09function+changeBgImage+%28image+%2C+id%29+%7B%0A%09%09%09element+%3D+id%3B%0A%09%09%09element.style.background+%3D+%22url%28%27%22%2Bimage%2B%22%27%29%22%3B+%2F%2A+%22url%28%27%22%2Bimage%2B%22%27%29%22%3B+%2A%2F%0A%09%09%09%7D%0A%09%09%3C%2Fscript%3E%0A%09%09+%0A++++%3C%2Fdiv%3E%0A'
   21    49    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.41 ms | 1399 KiB | 13 Q