3v4l.org

run code in 300+ PHP versions simultaneously
<?php function pmGetTaxRate($date = false) { if(!$date){ $date = time(); } if(!is_numeric($date)){ $date = strtotime($date); } if($date >= strtotime('2020-07-01') && $date < strtotime('2021-01-01')){ return 16; } return 19; } var_dump(pmGetTaxRate('2020-07-01'));

preferences:
38.3 ms | 402 KiB | 5 Q