3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $amount = 'M=$1.5'; $amt = $amount * (substr(amt, 0, (strlen($amt)-1) ) / 100); $amt = round($amt, 2, PHP_ROUND_HALF_UP); echo (float)$amt;
based on 7bTAq
Output for 7.1.0
Notice: Use of undefined constant amt - assumed 'amt' in /in/QMdge on line 5 Notice: Undefined variable: amt in /in/QMdge on line 5 Warning: A non-numeric value encountered in /in/QMdge on line 5 Warning: A non-numeric value encountered in /in/QMdge on line 5 0
Output for 5.5.0 - 5.6.28
Notice: Use of undefined constant amt - assumed 'amt' in /in/QMdge on line 5 Notice: Undefined variable: amt in /in/QMdge on line 5 0