3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $data['frequency'] = 0; $data['amount'] = 50; $data['custom-amount'] = 3.00; $charge = (function() use ($data) { if( $data['frequency']< 1 ) { if($data['amount'] == "0") { return $data['custom-amount']; }else { return $data['amount']; } }else { return "0.00"; } })(); echo $charge;
based on 1LWen
Output for 7.0.0 - 7.2.0
50
Output for 5.3.21 - 5.6.28
Parse error: syntax error, unexpected '(' in /in/3vJRa on line 18
Process exited with code 255.