function memory_get_usage
<?php function memoryChecker($variable) { echo ‘in function: ‘.memory_get_usage()."\n"; } echo ‘before function: ‘.memory_get_usage()."\n"; $var = "hello world\n"; memoryChecker($var);
<?php function memoryChecker($variable) { echo ‘in function: ‘.memory_get_usage()."\n"; } echo ‘before function: ‘.memory_get_usage()."\n"; $var = "hello world\n"; memoryChecker($var);
PhpStorm->Code->Reformat Code or Ctrl+Shift+Alt+L and click Reformat file
Checkout from other branch git checkout develop /path/to/file.php Checkout from HEAD git checkout HEAD — /path/to/file.php
Before PHP 7: if (isset($inputData)) { $param = $inputData; } else { $param = ‘default’; } In PHP 7: $param = $inputData ?? ‘default’; or $param = $inputData ?? $someData ?? ‘default’;