Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

dipta_dey's avatar

codice fiscale Calculator resource

I want to develop a Calculator for the Calculation of Tax CodeCalculate. Please Suggest to me any library or resource if available. I found 2 libraries but it's not perfect.

0 likes
7 replies
Sinnbeck's avatar

Just to save us time. Which two did you try and what was missing?

1 like
Sinnbeck's avatar

@dipta_dey and the other part of the question? Why not use one of these? "not perfect" is hard to know what you are missing

1 like
dipta_dey's avatar

@Sinnbeck first of all laravel base package not working after following their command line. and another is not working when I use their example code at index.php

use CodiceFiscale\Calculator;
use CodiceFiscale\Subject;

$subject = new Subject(
  array(
    "name" => "Mario",
    "surname" => "Rossi",
    "birthDate" => "1985-12-10",
    "gender" => "M",
    "belfioreCode" => "A562"
  )
);

$calculator = new Calculator($subject);
$codiceFiscale = $calculator->calculate();
echo $codiceFiscale; //"RSSMRA85T10A562S"

error: Subject class not found;

dipta_dey's avatar
dipta_dey
OP
Best Answer
Level 1
Maybe now this can be a better solution because it also has belfioreCode(state) json Just install and use
https://github.com/dipta995/codicefiscale-with-state.git
1 like

Please or to participate in this conversation.