Converting a Fraction to an Integer in PHP

Using the int command on a fraction will result in only the integer part being extracted from the fraction:

php<?php
  $test = (int) '1.2';
  var_dump($test); // outputs 1
?>

The command works similarly in the case when we don't have a string with a fraction, but just a fraction as a number:

php<?php
  $test = (int) 1.2;
  var_dump($test); // outputs 1
?>
Задание 1

Convert the following string to an integer:

php<?php
  $test = '12.345';
?>