<?php $now = new DateTime(); $birthday = new DateTime("1996-04-19"); // Y-m-d (Yıl-Ay-Gün) $age = $now->diff($birthday)->y; echo $age; // 18