« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 2 of about 2 for booked (0.002 sec.)
データの比較にコールバック関数を用い、配列の差を計算する 9357
« array_sum array_udiff_assoc » PHP Manual 配列 関数 データの比較にコールバック関数を用い、配列の差を計算する 検索 array_udiff (PHP 5, PHP 7, PHP 8) array_udiff — データの比較にコールバック関数を用い、配列の差を計算する 説明 function array_ ... ight] => 1 ) ) 例2 array_udiff() で DateTime オブジェクトを使う例 <?php class MyCalendar { public $free = array(); public $booked = array(); public function __construct ( $week = 'now' ) { $start = new DateTime ( $week ); $start -> modify ( 'Monday thi ... as $freeTime ) { $this -> free [] = $freeTime ; } } public function bookAppointment ( DateTime $date , $note ) { $this -> booked [] = array( 'date' => $date -> modify ( 'midnight' ), 'note' => $note ); } public function checkAvailability () { return a ... rray_udiff ( $this -> free , $this -> booked , array( $this , 'customCompare' )); } public function customCompare ( $free , $booked ) { if ( is_array ( $free )) $a = $ ...
https://man.mtool.work/php/8.3/function.array-udiff.html
データの比較にコールバック関数を用い、配列の差を計算する 9357
« array_sum array_udiff_assoc » PHP Manual 配列 関数 データの比較にコールバック関数を用い、配列の差を計算する 検索 array_udiff (PHP 5, PHP 7, PHP 8) array_udiff — データの比較にコールバック関数を用い、配列の差を計算する 説明 function array_ ... ight] => 1 ) ) 例2 array_udiff() で DateTime オブジェクトを使う例 <?php class MyCalendar { public $free = array(); public $booked = array(); public function __construct ( $week = 'now' ) { $start = new DateTime ( $week ); $start -> modify ( 'Monday thi ... as $freeTime ) { $this -> free [] = $freeTime ; } } public function bookAppointment ( DateTime $date , $note ) { $this -> booked [] = array( 'date' => $date -> modify ( 'midnight' ), 'note' => $note ); } public function checkAvailability () { return a ... rray_udiff ( $this -> free , $this -> booked , array( $this , 'customCompare' )); } public function customCompare ( $free , $booked ) { if ( is_array ( $free )) $a = $ ...
https://man.mtool.work/php/8.3/function.array-udiff.html
PREV 1 NEXT