3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_marko_age($birthday) { $today= time(); $age = ($today - $birthday)/(60*60*24*365); $float_value_of_age = floor($age); return $float_value_of_age; } echo "My name is Marko and I am <strong>"; echo get_marko_age('1985-01-09'); // here to change date and it automatically show number of years echo "</strong> years old.";
Output for 7.1.0 - 7.1.33, 7.2.0 - 7.2.24, 7.3.0 - 7.3.12
My name is Marko and I am <strong> Notice: A non well formed numeric value encountered in /in/pkl6n on line 6 45</strong> years old.
Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20
My name is Marko and I am <strong>45</strong> years old.

preferences:
140.23 ms | 402 KiB | 180 Q