• 0

PHP: Do you know basic syntax?


PHP: Do you know basic syntax?  

89 members have voted

  1. 1. Do you know basic syntax?

    • Yes, I'm a professional developer.
      33
    • Yes, I'm not a professional developer.
      30
    • I thought I did until now.
      13
    • No.
      13


Question

It seems that a lot or even most php programmers just jumped in and never read the manual or even know basic syntax...

The ones I see all the time are:

Not checking variable existence by just doing

$param = $_GET['param'];

instead of the correct

$param = isset($_GET['param']) ? $_GET['param'] : NULL;

which will not return a notice exception

Reference: http://au3.php.net/manual/en/language.variables.php

Using short tags

<?

instead of the proper

<?php

which will run on many more servers

Reference: http://php.net/manual/en/language.basic-syntax.php

Also the misuse of double quotes

$var = "hello";

should be

$var = 'hello';

which saves processing time

Reference: http://php.net/manual/en/language.types.st...g.syntax.single

Those are just some of the most common ones.

So what i'm asking is:

Why didn't you know this stuff if you didn't before hand?

Or if you did know this, then why do you think things like this are so ignored?

Note:

The option "I thought I did until now." should read "No, I'm a professional developer."

The option "No." should read "No, I'm a unprofessional developer."

-------------------

This thread has kinda turned into a tips thread, so here are a collection of tips that have been collected so far.

Single quotes vs Double quotes

$var = 'hello';
$string = '$var is '.$var;
// is faster than
$var = 'hello';
$string = "\$var is $var";

https://www.neowin.net/forum/index.php?show...amp;p=588249172

Switch statements VS if then else statements

switch ($var)
{
   case $option1:
	  break;
   case $option2:
	  break;
   default:
	  break;
}
// is faster than
if ( $var == $option1 )
{ }
elseif ( $var == $option2 )
{ }
else
{ }

Thanks to redFX for reminding us of that:

https://www.neowin.net/forum/index.php?show...amp;p=588271991

If then else statements VS ternary statements

if ( false )
{ echo 'true'; }
else
{ echo 'false'; }
// if faster than
echo (false ? 'true' : 'false');
// which is faster than
echo false ? 'true' : 'false';

Also applies for $var =, instead of echo. Thanks to redFX for that:

https://www.neowin.net/forum/index.php?show...amp;p=588271991

Pre-Increment VS Post-Increment

++$i;
// is faster than
$i++;

This applies everywhere, so in for loops etc. Thanks to phpmozzer for that:

https://www.neowin.net/forum/index.php?show...amp;p=588271806

Loops in order of speed

for, foreach, while, do-while. Thanks to redFX for that:

https://www.neowin.net/forum/index.php?show...amp;p=588271808

Strict (===) comparison is faster than loose (==) comparison.

https://www.neowin.net/forum/index.php?show...amp;p=588271983

Instantiating classes

$Class = & new Class();
// is faster than
$Class = new Class();

Thanks to http://www.php.lt/benchmark/phpbench.php

For loops and size calculations

for ( $i = 0, $n = sizeof($array); $i < $n; $i++ ) {}
// is faster than
for ( $i = 0; $i < sizeof($array); $i++ ) {}

https://www.neowin.net/forum/index.php?show...amp;p=588249623

Variable declarations and memory

$var1 = 'hello';
$var2 = $var1; // In C the variable var2 is created in memory right here
$var2 = 'bye'; // In PHP the variable var2 is created in memory here, up until now it still uses the same location of memory as var1

So in general, references should only be used if you want to work with the original variable, as it does not save memory or processing time.

https://www.neowin.net/forum/index.php?show...amp;p=588249172

If you know any others, feel free to post them :)

Edited by balupton
Link to comment
https://www.neowin.net/forum/topic/531433-php-do-you-know-basic-syntax/
Share on other sites

Recommended Posts

  • 0

I always check my vars, and also use the proper php tag. Don't use single quotes though, never learned it that way. Btw, how much processing time could it cost really? A ms isn't really valuable to me, especially not in non-professional environments.

Thanks for the tips though. :)

  • 0

Primexx, yes using single quotes would be faster, as using double quotes would waste time processing normal text. I only ever use double quotes for new lines (but that's just me).

Code.Red, add error_reporting(E_ALL); to the start of your code, and then see how many notices you get, as doing if ( $_GET['param'] ) to check if variables exist will send out notices if they don't, so on servers that do have all error reporting enabled their page would be riddled with notices.

status-seeker, yeah only a few milliseconds, but it's just getting into the correct habit, like coding correct xhtml/css valid, or even unobtrusive javascript right from the start, so it doesn't bight you in the ass later.

Some other ones are:

for ( $i = 0; $i < sizeof($array); $i++ ) {}
// the above has a serious performance problem, as it would re-calculate the size of the array in each iteration of the for loop

for ( $i = 0, $n = sizeof($array); $i < $n; $i++ ) {}
// the above is what should be used, as it gets the size of the array once and only once

The above is applicable for most languages, some C compilers detect it and fixes it up.

Another is if you are not modifying a variable, do not make a reference of it. In C what programmers do if they are working with large variables if pass it by reference to avoid duplicating the variable in memory. PHP only duplicates the variable in memory if the variable is changed. For example

$var1 = 'hello';
$var2 = $var1; // In C the variable var2 is created in memory right here
$var2 = 'bye'; // In PHP the variable var2 is created in memory here, up until now it still uses the same location of memory as var1

This is useful when working with large arrays, as what some people do is the following

{   // inside the for loop
$var = & $array[$i];
// some work with $var which doesn't modify it

So in this case it would be slower than the $var = $array[$i] alternative, as doing $var = & $array[$i] would create $var in memory and make it contain the address of $array[$i], however not using references it would just use $array[$i] directly until $var is modified.

If i remember any others i'll be sure to post them.

  • 0
for ( $i = 0; $i < sizeof($array); $i++ ) {}

// the above has a serious performance problem, as it would re-calculate the size of the array in each iteration of the for loop

for ( $i = 0, $n = sizeof($array); $i < $n; $i++ ) {}

[s]Wouldn't that do the exact same thing, as it still has to assign $n? I don't use for() much though, so I'm not 100%.[/s]

noob. Just realised.

Edited by TurboTuna
  • 0

for ( $i = 0; $i &lt; sizeof($array); $i++ ) {}
// is the same as
for ( $i = 0; true; $i++ ) {
if ( !($i &lt; sizeof($array)) ) break;
}

// however
for ( $i = 0, $n = sizeof($array); $i &lt; $n; $i++ ) {}
// is the same as
$i = 0;
$n = sizeof($array);
for ( , $i &lt; $n; $i++ ) {}

Make sense? In the first example we are re-calculating the size each time to use in the check, however in the 2nd example we calculate it once but we still check each time.

  • 0

Got some good pointers on here.

I create functions to check global variables so that the script doesn't crap out. Here's an example:

function Ses($key)
{
	if(array_key_exists($key, $_SESSION))
	{
		if(is_array($_SESSION[$key]))
			return $_SESSION[$key];
		else
			return trim($_SESSION[$key]);
	}
}

The same would apply to $_REQUEST and $_SERVER. It will even trim your values, just in case.

This is something I learned a few months ago from another developer here, which I love doing:

// For certain cases where a number needs to be preceded by a 0
$i = ($i &lt; 10 ? '0'.$i : $i);

// Also useful for functions where the variable doesn't have to be passed
// Using Ses() from earlier example
function GetUserInfo($user_id = false)
{
	// Method 1
	if(!$user_id)
		$user_id = Ses('user_id');

	// Method 2, i likes!
	$user_id = ($user_id ? $user_id : Ses('user_id'));

	// blah blah
}

The second usage isn't necessary and I'm not certain if that increases server load, but given that it's such a small operation it shouldn't be much of a difference either way. It's not the best example of this feature, but I've found it to be very useful in other scenarios.

  • 0

I am unprofessional developer. I downloaded a few free CMSs a couple of years ago to put up on my bands site. I ended up using e107. Then I started customizing it and sending in bug patches to the lone developer at the time. I eventually was asked to join a dev team. I look back now and realize how crappy some of that code was, but it worked and was a good time, and a great learning experience.

  • 0
So what i'm asking is:

Why didn't you know this stuff if you didn't before hand?

Or if you did know this, then why do you think things like this are so ignored?

i pretty much always use isset, reason people dont? maybe they don't realise its needed? this isn't really syntax tho

<?php over <? is more for portability/compatibilty, i've always used <? as its shorter and works :p maybe if i did something that was going to be released to a large user base i may then use <?php

i tend to use double quotes due to coming from C and because i tend to put new lines characters in which dont work in single quotes

i wouldn't say anything you pointed out in the first post is basic syntax really, both ways for all things mentioned are valid basic syntax, just some are slower / less compatible.

  • 0

isset is almost ignorable in a lot of cases. For example:

if (isset($_GET['blah'])) ...

Will return true and perform the action if and only if the $_GET['blah'] variable is set. This however does some processing and determines if $_GET['blah'] really is true or false.

Much simpler is to just do...

if ($_GET['blah']) ...

Because of how PHP runs, the only values in PHP that are considered to be false are "false" (boolean value), 0 (integer), null, and the empty string. So if there isn't a value in $_GET['blah']... the if statement won't execute. This is quicker in a LOT of cases because you don't have to evaluate more than one if statement.

Of course this can only be really used if you TRUST what you are going to get in $_GET['blah']. It would always be a good idea to check any external variables with some function that will strip malicious text.

Edit: I realize that doing it the second way causes a warning to be raised. I also believe this can be ignored in almost all cases other than the case mentioned in the last paragraph.

  • 0

Chavo, yeah that's the way to go, i started on b2evolution. Even now i look at code i did a few months ago and go dam that was bad.

Cailin, you could use;

if ( isset($_GET['param']) &amp;&amp; $_GET['param'] )
// or
if ( !empty($_GET['param'] )

Neither of those will return notices.

Because of how PHP runs, the only values in PHP that are considered to be false are "false" (boolean value), 0 (integer), null, and the empty string.
On a unrelated note that you probably already know but i'll say it anyway for the people that don't know is that the above is only by loose comparison not strict. Eg.

$var = false === 0;
var_export($var); // will output 'false';
// however
$var = false == 0;
var_export($var); // will output 'true';

Of course this can only be really used if you TRUST what you are going to get in $_GET['blah']. It would always be a good idea to check any external variables with some function that will strip malicious text.
Sure sure, but you can never really trust what is coming in through any user input, as it's easy to modify get, post, and cookie values.
  • 0

Just as long as people use $_GET and not auto-globals. When I first used PHP4, I couldn't figure out why data wasn't being passed. Now, I'd never use the old automatic method even though I did checks in the code.

As regards "foo $bar foo" verus 'foo ' . $bar . ' foo', I would expect the first to be faster but this is incredibly close. I avoid using double quotes if there is no variable content but beyond that, readable code is more important than shaving a fraction of a millisecond off. In this case, I think the first option is both more readable and faster so it's not an issue here of course.

balupton - nice tips. I didn't know about the reference-to-constant-variable tip. I thought $foo = $bar would immediately copy $bar in memory into $foo's space so I would use a reference on the assumption that it just uses 8 bytes and minimal processing whereas without a reference, I thought the whole variable would be copied. Readability comes into this as well - if you use a reference, it's clear that you want to access the same memory, whereas without a reference, you could experience some head-scratching bugs later on if you do make changes to $foo and expect $bar to update. It's up to the individual coder where their priorities lie, just remember that developer time is a resource just like processor time and memory. Comments work wonders in this situation too.

  • 0

phpmozzer thanks for that tip, didn't know it myself :) Here's the reasoning behind why that is for people wanting to know:

2) When incrementing or decrementing the value of the variable $i++ happens to be a tad slower then ++$i. This is something PHP specific and does not apply to other languages, so don't go modifying your C or Java code thinking it'll suddenly become faster, it won't. ++$i happens to be faster in PHP because instead of 4 opcodes used for $i++ you only need 3. Post incrementation actually causes in the creation of a temporary var that is then incremented. While pre-incrementation increases the original value directly. This is one of the optimization that opcode optimized like Zend's PHP optimizer. It is a still a good idea to keep in mind since not all opcode optimizers perform this optimization and there are plenty of ISPs and servers running without an opcode optimizer.

Taken from: http://ilia.ws/archives/12-PHP-Optimization-Tricks.html

Some others that may be worth mentioning:

echo is faster than print. Reference: http://www.faqts.com/knowledge_base/view.phtml/aid/1/fid/40

isset($array[$key]) is faster than array_key_exists($key, $array), but array_key_exists should be used if you want to respect empty (NULL) values inside the array. Reference: http://php.net/array_key_exists

  • 0

I always turn all errors on. None of my apps ever have any warnings or notices.

I exclusively use object oriented programming in PHP. Always found it to be a time saver and makes code smaller since I reuse object left and right.

A lot of people don't have a programming background and PHP is their first language. PHP is very forgiving (really!) as far as a programming language goes. People make mistakes and the PHP engine keeps on ticking.

Also, people have no concept of speed or memory allocation. It doesn't really matter on small projects but once you go corporate where there are hundreds of hits a minute, your app better be optimized to the fullest.

Here are some tips on speed... PHP speed, fastest to slowest:

for ()

foreach ()

while()

do {} while()

for() is the fastest for obvious reasons, the loop is doing a numerical operation, which, computers were designed for in the first place, no arrays, true/false, return values, just pure math.

foreach() is secondary for a less obvious reason. While it is slower then for(), since an actual iteration occurs, it's faster than while() because no return value is required.

do-while() is obviously going to be the slowest. It inherits the requirements of while() which is just above it in speed, and requires PHP to interpret a second construct "do".

Also, on control structures, switch is faster then if/else nests.

It's easy to understand why. Here's an example:

if ($variable === true)
	{
		// do something
	} elseif ($variable === false)
		// do something else
	}

In this example, PHP has to read each statement separately. So PHP will read "$variable === true" then "$variable === false". It has to process both those statements.

Here's the same as a switch:

switch ($variable)
	{
		case 'true':
			// do something
			break;
		case 'false':
			// do something else
			break;
	}

Now PHP will read "$variable === true OR false". Since PHP is only working with one variable, it doesn't have to parse the statement twice.

  • 0

Thanks for mentioning that stuff redFX :)

Just to note, that the different loops do all serve different purposes as well:

do whiles should be used for at least one iteration, saves you duplicating code up the top of your while loop.

foreach loops make a copy of the array in question, you do not work with it directly.

One that i'm quite curious about is using loose comparison over strict, eg. $var1 == $var2 or $var1 === $var2, which one is faster?

  • 0

The difference between == and === is that === checks not only value but type (float, bool, etc)

If you don't care about a variables type, use == which is faster.

Using === not only checks value but type so that's 2 things being processed rather then =='s 1 thing.

Ok the site http://www.php.lt/benchmark/phpbench.php says that === are quicker :) it's the last benchmark on the site. Good site, show's benchmarks for a lot of stuff discussed here :)

Something strange with the conclusion on that site. He says == takes 2 ms to process and === takes 3 ms. Then he says === is faster. He got his conclusion wrong based on his tests.

=== is slower then ==

And I just explained why.

  • 0

I would imagine, and that benchmark site agrees, that === is faster than == as === checks the value directly, however == takes into account variable types, eg. comparing the value against the other types as well. Eg. this is what i would imagine happens:

// $var == false looks like
$var === false || $var === '' || $var === 0
// where $var === false looks like
$var === false

Well that's what i would of thought, and makes sense to me, and seems to be right so far...

However what your saying is that

// $var === false looks like
$var == false &amp;&amp; gettype($var) == gettype(false)

....

  • 0
I would imagine, and that benchmark site agrees, that === is faster than == as === checks the value directly, however == takes into account variable types, eg. comparing the value against the other types as well. Eg. this is what i would imagine happens:

// $var == false looks like
$var === false || $var === '' || $var === 0
// where $var === false looks like
$var === false

Well that's what i would of thought, and makes sense to me, and seems to be right so far...

However what your saying is that

// $var === false looks like
$var == false &amp;&amp; gettype($var) == gettype(false)

....

Yup, I'm saying the bottom code happens. Take a look at this example:

$test1 = (bool)1;
$test2 = (float)1;

if ($test1 == $test2) echo 'Yes'; else echo 'no';
echo "\n";
if ($test1 === $test2) echo 'Yes'; else echo 'no';

The first if statement using == outputs 'Yes'. It does a quick value comparison disregarding type. Whereas the second if statement does a value comparison plus gets the type for each value and compares that too. The output of the second if statement is 'No'

EDIT: Ok, strangely enough === seems faster then == in my tests. I ran an if statement 5 million times once each for == and for ===.

== seemed to be 4/10 of a second faster then === when processing 5 million times.

Its rather strange since == disregards type and === has to check type.

Alright, time to dig into the source code for PHP to see why that's the case.

Edited by redFX
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Wow, Microsoft IS cooking lately... This only shows that they COULD improve, they just chose not to for whatever reasons. That obsession with AI was destroying them from the inside out.
    • BATorrent 4.1.0 by Razvan Serea BATorrent is a lightweight, open-source BitTorrent client built with modern C++ and Qt 6, offering a clean, fast, and privacy-focused alternative to traditional torrent apps. It supports magnet links, .torrent files, resume data, sequential downloading, per-file priorities, and even imports from qBittorrent. Power users benefit from integrated RSS auto-download with regex filtering, duplicate detection, and automatic tracker lists from Stremio. Streaming is seamless thanks to auto-detected players like VLC and IINA. BATorrent includes robust VPN tools—interface binding, auto-detection for WireGuard-based services like Mullvad and NordLynx, kill switch, proxy support, and IP filtering. A full WebUI enables remote control, while integrations with Plex, Jellyfin, and Emby automate library updates. With themes, speed scheduling, system-tray alerts, and cross-platform support for Windows, Linux, and macOS, BATorrent delivers a polished, high-performance torrenting experience. BATorrent features: Core .torrent file and magnet link support Resume data — picks up where you left off after restart Import torrents from qBittorrent Create .torrent files from any file or folder Sequential download mode Per-file priority control (skip, low, normal, high) Seed ratio limits with auto-pause DHT, PEX, UPnP, NAT-PMP RSS Auto-Download Subscribe to RSS feeds — automatically download new torrents as they appear Regex filters — match only what you want (e.g. 1080p|720p, S01E\d+) Per-feed settings — custom save path, check interval (5–1440 min), enable/disable Auto-download — matched items are downloaded automatically in the background Supports magnet links, .torrent URLs, and tags Tray notifications when items are auto-downloaded Duplicate detection — never downloads the same item twice Stremio Stremio Addon System pre-installed — works out of the box Auto tracker list from ngosang/trackerslist Streaming Play while downloading — stream video files before the download is complete Supports mp4, mkv, avi, mov, wmv, flv, webm, m4v, ts Auto-detects installed players (VLC, IINA, system default) VPN & Privacy Interface binding — lock torrent traffic to a specific network interface (e.g. tun0) Auto VPN detection — identifies VPN interfaces (tun, tap, WireGuard, Mullvad, NordLynx, ProtonVPN) Kill switch — automatically pauses all torrents if the VPN interface drops Auto-resume — resumes only the torrents paused by the kill switch when VPN reconnects Proxy support — SOCKS5 and HTTP proxy with optional authentication IP filtering — load P2P blocklists to block unwanted IP ranges Protocol encryption (enabled / forced / disabled) WebUI Remote management — control torrents from any browser at http://localhost:8080 REST API with JSON responses Add torrents via magnet link or .torrent upload Pause, resume, remove torrents remotely View peers and files per torrent Dark theme matching the desktop app HTTP Basic Auth with SHA-256 password hashing Configurable port and remote access (localhost vs 0.0.0.0) Interface 3 themes: Dark, Light, Midnight (bat/vampire aesthetic) Real-time speed graph Detailed panel with tabs: General, Peers, Files, Trackers Filter bar: search by name, filter by state (Active, Downloading, Seeding, Paused, Finished) Drag & drop .torrent files and magnet links Drag & drop reorder in torrent list System tray with notifications (download complete, kill switch events, RSS auto-downloads) Splash screen with bat animation Bilingual: English and Portuguese (BR), auto-detected from system locale Bandwidth Scheduler Alternative speed limits — set different download/upload limits on a schedule Time range — configure active hours (e.g. 01:00 to 07:00), supports overnight ranges Per-day control — choose which days of the week the schedule applies Automatically switches between normal and alternative speeds Media Server Integration Plex — automatically trigger library scan when a download completes Jellyfin / Emby — same automatic library refresh via API Configure server URL and authentication token/key in Settings System Cross-platform: Windows, Linux, macOS Auto-shutdown — automatically shut down PC when all downloads complete (60s cancellable countdown) Auto-update system (AppImage on Linux, installer on Windows, DMG on macOS) CLI arguments: pass .torrent files or magnet: URIs directly Keyboard shortcuts: Space to toggle pause, Ctrl+A to select all, Ctrl+O to open BATorrent 4.1.0 release notes: A community-driven release: everything here came straight from your reports and requests. It closes the remaining gaps with qBittorrent and fixes the Windows settings/tray/splash issues several of you hit. Fixed Settings now actually save. A whole class of preferences — speed limits (and the alternative limits), max active downloads, seed ratio, listen port, max connections, DHT/uTP/encryption, VPN interface, kill switch and proxy — weren't being persisted and reset to defaults on every launch. They now round-trip correctly. (Thanks to everyone who reported "the upload limit always goes back to 0".) Splash and tray toggles stick on Windows. Turning off the startup animation (or "close to tray") no longer reverts — the Windows registry stored these booleans as integers and the UI was misreading them. Close-to-tray hint. The first time the window hides to the tray you get a one-time notification, so the app doesn't look like it vanished (Windows 11 tucks new tray icons into the overflow). macOS Dock icon size. The icon filled its canvas edge-to-edge and rendered larger than neighbouring apps; it now uses the standard safe-area padding. Native file picker language. The "Torrent file / All files" filter in the open dialog follows the app language instead of being hard-coded. Added — qBittorrent parity Alternative speed limits toggle — a turtle button in the toolbar flips your throttled limits on/off instantly, independent of the scheduler. Follow system theme — switch light/dark automatically with the OS (Settings → Appearance). Pre-allocate disk space — reserve the full file size up front to reduce fragmentation (Settings → Downloads). Recheck data on add — optionally force a hash check when adding a torrent, so existing or partial files on disk are detected. Port status indicator — a 🔴 dot in the status bar shows whether your listen port looks reachable (UPnP/NAT-PMP + listen state; fully local, no external check). Add torrent from URL — File → Add torrent from URL (Ctrl+U) fetches a remote .torrent and routes it through the normal add dialog. Export .torrent — right-click a torrent → Export .torrent to save its metadata file. Already there (in case you missed it) Watch folder — auto-add .torrent files dropped into a monitored directory (Settings → Files). This release just surfaces it. Incomplete files already carry a .!bt suffix until they finish. Under the hood Regression tests for the settings-persistence and Windows boolean bugs. A new Qt Quick Test harness covering the startup splash and the design-system widgets. Download: BATorrent 4.1.0 | 37.5 MB (Open Source) Download: BATorrent Portable | 51.7 MB Links: BATorrent Website | Screenshot | Changelog Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Disabling open on hover, great! That was so stupid! They need to do a fix, where if a network share is disconnected, it doesn't hang when opening "This PC" for 20 seconds.
    • Microsoft releases major feature updates for stock Windows 11 apps by Taras Buria In addition to releasing new Windows 11 preview builds, Microsoft announced that inbox Windows apps now have dedicated release notes in the official documentation. At long last, users have access to all the release notes for each app, with changes listed in chronological order. Microsoft used to announce feature updates for stock apps with each build. Now, with Windows Insider release notes hosted on the Microsoft Learn website, each app has a dedicated space for its changelog, which is very useful for those who want to track new features and improvements. Alongside that, Microsoft dropped massive feature updates for six stock apps: Clock, Media Player, Calculator, Voice Recorder, Photos, and Paint. Each app packs quite a lot of changes and new capabilities, so here are the release notes. Here are quick notes so that you can jump to the app you are interested in the most: Calculator Camera Clock Media Player Paint Photos Sound Recorder Here is what is new for the Calculator in version 11.2605.9.0: More accurate square-root results — Fixed rare cases where a calculation that should equal zero (like sqrt(2.25) - 1.5) returned a tiny leftover value instead. Readable text in High Contrast themes — Settings text now shows the correct colors in the High Contrast Aquatic and Desert themes. Fixed layout for right-to-left languages — For languages like Arabic and Hebrew, the graph, number pad, equation fields, and scroll buttons now appear correctly oriented. Reliable launch after upgrading — Fixed an issue where upgrading from much older versions could leave outdated settings that stopped the app from opening. Here is what is new for the Camera app (version 2026.2605.7.0): Zoom slider works on more cameras — The zoom slider now works on the latest cameras, respects your system zoom settings, and updates instantly when you change those settings. Full range of zoom levels — Fixed an issue where the zoom slider only showed three steps on some devices that zoom in finer increments. Front camera works on more devices — Resolved a problem that blocked the front-facing camera on certain wide-angle devices. More video resolution choices — You can now pick video resolutions that were previously hidden; the app shows a heads-up warning instead of removing them. QR links you can still use — When a scanned QR code points to something with no matching app, the link is now copied to your clipboard (with a notification) while still offering a Store search. Smarter default settings — When you haven't set a preference, the app now follows your system settings by default. The Clock app has a massive changelog with the following improvements in version 11.2605.9.0: Timers keep counting after they hit zero — When a timer runs out, it now keeps counting up (for example, -00:27:31) so you can see how far past the time you've gone. You can turn off the daily goal — Focus Sessions now include an "Off" option so you can skip setting a daily goal entirely. New 15-minute snooze option — Alarms now offer a 15-minute snooze interval. Run up to 3 countdowns at once — The Countdown Widget now supports three simultaneous countdowns, up from two. Timer Widget notifications now appear — Fixed an issue where the "timer finished" notification didn't show when the timer was started from the widget. Less clutter in Focus Sessions — Tasks you've already completed no longer show up in the Focus Session task list. More accurate focus progress — Fixed a rounding issue that could show your daily focus progress as a minute short (for example, 49 minutes instead of 50). Smoother World Clock comparisons — The World Clock compare page now loads dates as you scroll, so it feels more responsive. Up-to-date World Clock locations — Refreshed country and city names to match their current names. Correct sun and moon icons during midnight sun — Fixed an icon that wrongly showed a moon during all-day daylight in polar regions. Fixed back-button behavior in clock comparisons — Pressing back once now takes you back as expected, instead of jumping the date to 1926. Corrected the Newfoundland time zone — Newfoundland now uses the right time zone (St. John's). Disabled alarms stay looking disabled — Editing a turned-off alarm no longer makes it appear turned on. Cleaner timer cards — The expand button is now turned off on timer cards that have no time set, preventing actions that wouldn't do anything. Clearer theme setting — Updated the wording to "Choose your preferred app theme." Smoother Settings links — The "About" links in Settings no longer trigger an unexpected "switch apps" prompt. Fixed spacing in Spotify settings — Corrected uneven spacing in the Spotify settings card. Better focus visibility in High Contrast — The focus highlight in World Clock is now clearly visible in the High Contrast Aquatic and Desert themes. No more double announcements — Screen readers no longer read the timer value twice. Countdown names read correctly — Screen readers now properly announce the name of each countdown. Keyboard focus stays put — Focus no longer disappears after you press the Timer Reset button. Clearer alarm toggle for screen readers — Tidied up how the alarm on/off switch is announced. The Media Player app received plenty of changes as well (version 11.2605.14.0): Custom captions — You can now personalize how closed captions appear, with caption styling tied to your Windows caption settings, plus a quick link to open those settings directly. "Indexing" banner in the play queue — When your media library is still being scanned, a banner now explains why some items may not appear yet. Fixed the look of selected items — Corrected a layout glitch with selected items in lists. Fewer playback failures — Improved how the app recognizes supported file types, so more files play without issues. Playlists need a name — You can no longer accidentally save a playlist with a blank name. Cleaner look for empty playlists — Improved how a playlist appears when it has no items yet. More stable play queue edits — Fixed a crash that could happen when changing the play queue while the app was switching between sessions. Clearer "missing codec" message — Improved the dialog that appears when a file needs a codec you don't have, with clearer guidance on what to do. A big update is also available for Paint in version 11.2605.61.0: Adjustable eraser transparency — You can now control how transparent the eraser is. Cleaner stamp brush strokes — Fixed visible color shifts and artifacts when using stamp-style brushes. JPEG photos save in place — Opening a rotated JPEG and pressing Save now overwrites the original instead of unexpectedly prompting "Save As." No more crash on bad image files — Opening a damaged or invalid image, from within the app, by double click, or commandline, now shows a clear error message instead of closing the app. Classic selection behavior restored — The selection outline now hides while you move, resize, or rotate a selection, just like in classic Paint. Tidier AI image panel — Fixed missing spacing at the bottom of the AI image generation panel for a cleaner layout. Visible button hover in light theme — Toolbar split buttons now show a clear hover highlight in the light theme. Snappier toolbar — Streamlined how the ribbon lays out, giving a small speed boost at startup. Fewer background crashes — Fixed a crash that could happen while background tasks were finishing up. Stable app shutdown — Prevented rare crashes when closing the app. Fixed layer removal glitch — Deleting the active layer no longer leaves the layers list in an inconsistent state. Here is what is new in the Photos app (version 2026.11060.2004.0): AI watermarking — AI-generated or edited images can now carry a visible Copilot watermark. You choose Never, Always, or Ask Every Time in Settings, with a confirmation when saving. The watermarking is off by default in settings. Better viewing of small images and pixel art — Tiny images (like 16×16 pixel art) now zoom in far more to fill the screen and stay crisp instead of looking blurry. Select scanned text with the keyboard — When text is detected in an image, you can now navigate and select it using the arrow keys, Shift+Arrow, Home/End, and Ctrl+A, with a clear focus highlight. Fixed a crash in text recognition — Resolved a crash that could close Photos while detecting text in images; the app now recovers gracefully. Easier keyboard navigation — Tabbing through the navigation bar no longer stops on hidden controls, so it takes a single Tab to move past it instead of three. And finally, here is the Sound Recorder (version 11.2605.1.0): Waveform shows with Bluetooth mics — The live waveform now displays correctly when you record using a Bluetooth audio device. No more stray scrollbar — A non-working horizontal scrollbar no longer appears at the bottom of the waveform unless you've zoomed in. Mark button ready right away — The Mark button no longer looks grayed out until you hover over it after opening the app. Markers hidden for WAV files — Markers are now turned off for WAV recordings, since that format can't store them — so they're no longer lost silently. Smoother deleting — Quickly pressing Delete and Enter to remove several recordings in a row no longer triggers a "file doesn't exist" error. Fixed a memory issue — Resolved a memory leak that occurred each time a recording started. You can find all these changelogs in the official documentation here.
  • Recent Achievements

    • Very Popular
      AndrewSteel earned a badge
      Very Popular
    • Veteran
      Taliseian went up a rank
      Veteran
    • One Month Later
      Clizby earned a badge
      One Month Later
    • One Month Later
      Timaximus earned a badge
      One Month Later
    • Week One Done
      Timaximus earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      516
    2. 2
      PsYcHoKiLLa
      170
    3. 3
      +Edouard
      162
    4. 4
      Steven P.
      84
    5. 5
      ATLien_0
      78
  • Tell a friend

    Love Neowin? Tell a friend!