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; } echo (1 + pmGetTaxRate()/ 100);
Output for 7.2.0 - 7.2.31, 7.3.0 - 7.3.19, 7.4.0 - 7.4.7
1.19

preferences:
72.11 ms | 402 KiB | 65 Q