As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the Java™ programming language.)
<?php
require_once 'dy_functions.php';
$result = queryMysql( 'SELECT * FROM task' );
$date = array();
while ( ( $row = $result->fetch_array( MYSQLI_ASSOC ) ) !== false ) {
$date[] = $row;
}
echo json_encode( $date );
for ( $i = 0 ; $i < $result->num_rows ; $i ++ ) {
$date[] = $result->fetch_array( MYSQLI_ASSOC );
}