3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php if ($_product->isAvailable()): ?> <p class="availability in-stock"><?php echo $this->__('Availability:') ?> <?= (int) Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getQty()?> <span><?php echo $this->__('in stock') ?></span></p> <?php else: ?> <p class="availability out-of-stock"><?php echo $this->__('Availability: ') ?> <span><? php echo $this->__('Call for Availability') ?></span></p> <?php endif; ?>
Output for 5.4.0 - 5.5.11
Parse error: syntax error, unexpected 'echo' (T_ECHO) in /in/SJCiG on line 4
Process exited with code 255.
Output for 5.0.4 - 5.3.28
Notice: Undefined variable: _product in /in/SJCiG on line 1 Fatal error: Call to a member function isAvailable() on a non-object in /in/SJCiG on line 1
Process exited with code 255.
Output for 5.0.0 - 5.0.3
Notice: Undefined variable: _product in /in/SJCiG on line 1 Fatal error: Call to a member function isAvailable() on a non-object in /in/SJCiG on line 1
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Call to a member function on a non-object in /in/SJCiG on line 1
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to a member function on a non-object in /in/SJCiG on line 1