<?php
declare(strict_types=1);require __DIR__.'/datetime-oracle.php';$s=['data_type'=>'datetime','column_type'=>'datetime'];$t=['data_type'=>'DATETIME','data_scale'=>6];$want='2026-10-11 00:00:00';$n=0;foreach(['staff','user'] as $table)foreach([$want,$want.'.000000'] as $actual){if(!exactCreateTime($table,'create_time',$actual,$want,$s,$t))throw new RuntimeException('Valid explicit CREATE_TIME');$n++;}foreach([null,0,1.0,true,[],new stdClass(),'2026-10-11 00:00:00.000001','2026-10-11 00:00:01.000000','2026-02-30 00:00:00.000000','2026-10-11 24:00:00.000000','2026-10-11 00:00:00.00000',' 2026-10-11 00:00:00.000000','2026-10-11 00:00:00.000000 '] as $bad){if(exactCreateTime('staff','create_time',$bad,$want,$s,$t))throw new RuntimeException('Invalid native date/type');$n++;}foreach([['staff','update_time',$s,$t],['restaurants','create_time',$s,$t],['staff','create_time',['data_type'=>'varchar','column_type'=>'varchar'],$t],['staff','create_time',$s,['data_type'=>'DATETIME','data_scale'=>5]]] as [$table,$col,$ss,$tt]){if(exactCreateTime($table,$col,$want.'.000000',$want,$ss,$tt))throw new RuntimeException('Other column/schema denied');$n++;}if(exactCreateTime('staff','create_time','2026-02-30 00:00:00.000000','2026-02-30 00:00:00',$s,$t))throw new RuntimeException('Invalid expected date denied');$n++;echo json_encode(['checks'=>$n,'counterexamples'=>18,'SQL'=>0,'HTTP'=>0]),"\n";
