Skip to content

Instantly share code, notes, and snippets.

@mgsmus
Last active December 8, 2019 19:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mgsmus/5bfb50617dd39e17206df51cc06371af to your computer and use it in GitHub Desktop.
Save mgsmus/5bfb50617dd39e17206df51cc06371af to your computer and use it in GitHub Desktop.
<?php
// Bunun yerine
$this->request->data['comments']['user_id'] = $this->request->data['comments']['user_id'] ?? 'value';
// Şu şekilde bir kullanım mümkün.
// Kod tekrarının önüne geçilmiş oluyor.
$this->request->data['comments']['user_id'] ??= 'value';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment