3v4l.org

run code in 300+ PHP versions simultaneously
<?php $question = ['name' => 'How many steps has your stair', 'price' => 10.00]; // price per step = 10 $steps = 5; if($steps >= 5 ) { $question['price'] = 8.00; echo $steps * $question['price']; } else { echo $steps * $question['price']; } // Databse now: // product: has { category_id } // product_question { id | product_id | question_id | price } // Manage the conditional price in the DB.
Output for git.master, git.master_jit, rfc.property-hooks
40

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:
59.64 ms | 1418 KiB | 4 Q