Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

PHP === operator

Empfohlene Antworten

Veröffentlicht

hi leute,

habe ein wenig probleme den === operator zu interpretieren. wann verwende ich diesen anstatt des == operators?

PHP Manual:

int strpos ( string haystack, string needle [, int offset] )

Note:

It is easy to mistake the return values for "character found at position 0" and "character not found". Here's how to detect the difference:

copy to clipboard

// in PHP 4.0b3 and newer:

$pos = strpos($mystring, "b");

if ($pos === false) { // note: three equal signs

// not found...

}

// in versions older than 4.0b3:

$pos = strpos($mystring, "b");

if (!is_integer($pos)) {

// not found...

}

worin sind die unterschiede??

Viele Grüße

kills

Original geschrieben von gurkenpapst

$a === $b Identisch Gibt TRUE zurück wenn $a gleich $b ist und beide vom gleichen Typ sind(nur PHP 4).

aus http://www.php.net/manual/de/language.operators.comparison.php

gruß gurkenpapst

ah danke.

heisst das jetzt das $a===$b true ist wenn z.b. beides ein integer ist?

Das ist richtig. $a===$ba prüft, ob inhalt und typ gleich sind.

Wobei $a==$b vorher nötigenfalls noch eine Typumwandlung macht und dann den Inhalt vergleicht:

0=="" wird zu 0==0.

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.