3v4l.org

run code in 300+ PHP versions simultaneously
<?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 git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $_product in /in/SJCiG on line 1 Fatal error: Uncaught Error: Call to a member function isAvailable() on null in /in/SJCiG:1 Stack trace: #0 {main} thrown in /in/SJCiG on line 1
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
37.87 ms | 401 KiB | 8 Q